toad.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
Mastodon server operated by David Troy, a tech pioneer and investigative journalist addressing threats to democracy. Thoughtful participation and discussion welcome.

Administered by:

Server stats:

240
active users

#await

0 posts0 participants0 posts today
Felix Palmen :freebsd: :c64:<p>Solved! 🥳 </p><p>This was a pretty "interesting" bug. Remember when I invented a way to implement <a href="https://mastodon.bsd.cafe/tags/async" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>async</span></a> / <a href="https://mastodon.bsd.cafe/tags/await" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>await</span></a> in <a href="https://mastodon.bsd.cafe/tags/C" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>C</span></a>, for jobs running on a threadpool. Back then I said it only works when completion of the task resumes execution on the *same* pool thread.</p><p>Trying to improve overall performance, I found the complex logic to identify the thread job to put on a pool thread a real deal-breaker. Just having one single MPMC queue with a single semaphore for all pool threads to wait on is a lot more efficient. But then, a job continued after an awaited task will resume on a "random" thread.</p><p>It theoretically works by making sure to restore the CORRECT context (the original one of the pool thread) every time after executing a job, whether partially (up to the next await) or completely.</p><p>Only it didn't, at least here on <a href="https://mastodon.bsd.cafe/tags/FreeBSD" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>FreeBSD</span></a>, and I finally understood the reason for this was that I was using <a href="https://mastodon.bsd.cafe/tags/TLS" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>TLS</span></a> (thread-local storage) to find the context to restore.</p><p>Well, most architectures store a pointer to the current thread metadata in a register. <a href="https://mastodon.bsd.cafe/tags/POSIX" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>POSIX</span></a> user <a href="https://mastodon.bsd.cafe/tags/context" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>context</span></a> <a href="https://mastodon.bsd.cafe/tags/switching" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>switching</span></a> saves and restores registers. I found a source claiming that the <a href="https://mastodon.bsd.cafe/tags/Linux" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Linux</span></a> (<a href="https://mastodon.bsd.cafe/tags/glibc" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>glibc</span></a>) implementation explicitly does NOT include the register holding a thread pointer. Obviously, <a href="https://mastodon.bsd.cafe/tags/FreeBSD" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>FreeBSD</span></a>'s implementation DOES include it. POSIX doesn't have to say anything about that.</p><p>In short, avoiding TLS accesses when running with a custom context solved the crash. 🤯</p>
Felix Palmen :freebsd: :c64:<p>Today, I implemented the <a href="https://mastodon.bsd.cafe/tags/async" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>async</span></a> / <a href="https://mastodon.bsd.cafe/tags/await" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>await</span></a> pattern (as known from <a href="https://mastodon.bsd.cafe/tags/csharp" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>csharp</span></a> and meanwhile quite some other languages) ...</p><p>... in good old <a href="https://mastodon.bsd.cafe/tags/C" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>C</span></a>! 😎 </p><p>Well, at least sort of.</p><p>* It requires some standard library support, namely <a href="https://mastodon.bsd.cafe/tags/POSIX" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>POSIX</span></a> user context switching with <a href="https://mastodon.bsd.cafe/tags/getcontext" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>getcontext</span></a> and friends, which was deprecated in POSIX-1.2008. But it's still available on many systems, including <a href="https://mastodon.bsd.cafe/tags/FreeBSD" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>FreeBSD</span></a>, <a href="https://mastodon.bsd.cafe/tags/NetBSD" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>NetBSD</span></a>, <a href="https://mastodon.bsd.cafe/tags/Linux" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Linux</span></a> (with <a href="https://mastodon.bsd.cafe/tags/glibc" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>glibc</span></a>). It's NOT available e.g. on <a href="https://mastodon.bsd.cafe/tags/OpenBSD" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>OpenBSD</span></a>, or Linux with some alternative libc.</p><p>* I can't do anything about the basic language syntax, so some boilerplate comes with using it.</p><p>* It has some overhead (room for extra stacks, even extra syscalls as getcontext unfortunately also always saves/restores the signal mask)</p><p>But then ... async/await in C! 🥳 </p><p>Here are the docs:<br><a href="https://zirias.github.io/poser/api/latest/class_p_s_c___async_task.html" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">zirias.github.io/poser/api/lat</span><span class="invisible">est/class_p_s_c___async_task.html</span></a></p><p><a href="https://mastodon.bsd.cafe/tags/C" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>C</span></a> <a href="https://mastodon.bsd.cafe/tags/coding" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>coding</span></a></p>
Felix Palmen :freebsd: :c64:<p>I finally eliminated the need for a dedicated <a href="https://mastodon.bsd.cafe/tags/thread" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>thread</span></a> controlling the pam helper <a href="https://mastodon.bsd.cafe/tags/process" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>process</span></a> in <a href="https://mastodon.bsd.cafe/tags/swad" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>swad</span></a>. 🥳 </p><p>The building block that was still missing from <a href="https://mastodon.bsd.cafe/tags/poser" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>poser</span></a> was a way to await some async I/O task performed on the main thread from a worker thread. So I added a class to allow exactly that. The naive implementation just signals the main thread to carry out the requested task and then waits on a <a href="https://mastodon.bsd.cafe/tags/semaphore" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>semaphore</span></a> for completion, which of course blocks the worker thread.</p><p>Turns out we can actually do better, reaching similar functionality like e.g. <a href="https://mastodon.bsd.cafe/tags/async" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>async</span></a> / <a href="https://mastodon.bsd.cafe/tags/await" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>await</span></a> in C#: Release the worker thread to do other jobs while waiting. The key to this is user context switching support like offered by <a href="https://mastodon.bsd.cafe/tags/POSIX" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>POSIX</span></a>-1.2001 <a href="https://mastodon.bsd.cafe/tags/getcontext" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>getcontext</span></a> and friends. Unfortunately it was deprecated in POSIX-1.2008 without an obvious replacement (the docs basically say "use threads", which doesn't work for my scenario), but still lots of systems provide it, e.g. <a href="https://mastodon.bsd.cafe/tags/FreeBSD" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>FreeBSD</span></a>, <a href="https://mastodon.bsd.cafe/tags/NetBSD" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>NetBSD</span></a>, <a href="https://mastodon.bsd.cafe/tags/Linux" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Linux</span></a> (with <a href="https://mastodon.bsd.cafe/tags/glibc" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>glibc</span></a>) ...</p><p>The posercore lib now offers both implementations, prefering to use user context switching if available. It comes at a price: Every thread job now needs its private stack space (I allocated 64kiB there for now), and of course the switching takes some time as well, but that's very likely better than leaving a task idle waiting. And there's a restriction, resuming must still happen on the same thread that called the "await", so if this thread is currently busy, we have to wait a little bit longer. I still think it's a very nice solution. 😎 </p><p>In any case, the code for the PAM credential checker module looks much cleaner now (the await "magic" happens on line 174):<br><a href="https://github.com/Zirias/swad/blob/57eefe93cdad0df55ebede4bd877d22e7be1a7f8/src/bin/swad/cred/pamchecker.c" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">github.com/Zirias/swad/blob/57</span><span class="invisible">eefe93cdad0df55ebede4bd877d22e7be1a7f8/src/bin/swad/cred/pamchecker.c</span></a></p><p><a href="https://mastodon.bsd.cafe/tags/C" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>C</span></a> <a href="https://mastodon.bsd.cafe/tags/coding" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>coding</span></a></p>
axadle<p>Exciting Developments and Challenges Await African Teams in the 2026 World Cup Qualifiers <a href="https://mastodon.social/tags/EastAfrica" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>EastAfrica</span></a> <a href="https://mastodon.social/tags/NorthAfrica" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>NorthAfrica</span></a> <a href="https://mastodon.social/tags/SouthernAfrica" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>SouthernAfrica</span></a> <a href="https://mastodon.social/tags/WestAfrica" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>WestAfrica</span></a> <a href="https://mastodon.social/tags/Africa" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Africa</span></a> <a href="https://mastodon.social/tags/African" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>African</span></a> <a href="https://mastodon.social/tags/await" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>await</span></a> <a href="https://mastodon.social/tags/business" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>business</span></a> <a href="https://mastodon.social/tags/challenges" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>challenges</span></a> <a href="https://mastodon.social/tags/cup" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>cup</span></a> <a href="https://mastodon.social/tags/currentevents" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>currentevents</span></a> <a href="https://mastodon.social/tags/Developments" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Developments</span></a> <a href="https://mastodon.social/tags/EASTAFRICA" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>EASTAFRICA</span></a> <a href="https://mastodon.social/tags/Economy" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Economy</span></a> <a href="https://mastodon.social/tags/Exciting" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Exciting</span></a> <a href="https://mastodon.social/tags/news" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>news</span></a> <a href="https://mastodon.social/tags/politics" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>politics</span></a> <a href="https://mastodon.social/tags/qualifiers" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>qualifiers</span></a> <a href="https://mastodon.social/tags/Soccer" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Soccer</span></a> <a href="https://mastodon.social/tags/Sport" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Sport</span></a> <a href="https://mastodon.social/tags/sports" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>sports</span></a> <a href="https://mastodon.social/tags/teams" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>teams</span></a> <a href="https://mastodon.social/tags/trade" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>trade</span></a> <a href="https://mastodon.social/tags/travel" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>travel</span></a> <a href="https://mastodon.social/tags/WestAfrica" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>WestAfrica</span></a> <a href="https://mastodon.social/tags/world" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>world</span></a> <a href="https://mastodon.social/tags/WorldCup" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>WorldCup</span></a>&nbsp;<br><a href="https://tinyurl.com/2cbz3f22" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="">tinyurl.com/2cbz3f22</span><span class="invisible"></span></a></p>
Alvin Ashcraft 🐿️<p>Cancellation, Part 6: Linking by Stephen Cleary.</p><p><a href="https://hachyderm.io/tags/dotnet" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>dotnet</span></a> <a href="https://hachyderm.io/tags/csharp" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>csharp</span></a> <a href="https://hachyderm.io/tags/async" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>async</span></a> <a href="https://hachyderm.io/tags/await" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>await</span></a> <a href="https://hachyderm.io/tags/programming" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>programming</span></a> <br><a href="https://blog.stephencleary.com/2024/10/cancellation-6-linking.html" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">blog.stephencleary.com/2024/10</span><span class="invisible">/cancellation-6-linking.html</span></a></p>
billseipel<p>I have a for loop in C#</p><p>All it does is add to a collection of Tasks:</p><p>list.Add(myMethodAsync);</p><p>After the loop, I have a </p><p>var result = await Task.WhenAll(myCollection);</p><p>Rather than wait for ALL the tasks...<br>as soon as the list has a FALSE , I need it to exit the iteration.</p><p>Tips?</p><p><a href="https://fosstodon.org/tags/csharp" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>csharp</span></a> <a href="https://fosstodon.org/tags/dotnet" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>dotnet</span></a> <a href="https://fosstodon.org/tags/async" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>async</span></a> <a href="https://fosstodon.org/tags/await" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>await</span></a></p>
hrbrmstr's Daily Drop<p><strong>Nish; await; slugify</strong></p><p>We focus on two shell utilities and one “super” shell in today’s Bonus edition.</p> <p><a href="https://dailydrop.hrbrmstr.dev/?post_type=post&amp;p=139502511" rel="nofollow noopener" target="_blank">Subscribe</a></p> <p><strong>TL;DR</strong></p><p><em>(This is an AI-generated summary of today’s edition.)</em></p><p><em>(Could not for the life of me get it to produce links today…I think there’s some tweaking going on to compete with Gemini.)</em></p><ul><li>The blog post discusses “Nish”, a new, non-POSIX, multiplatform command-line “super” shell currently in the beta stage. Nish offers features such as tab completion, syntax highlighting, variables, aliases, and a database to store all shell-related data. It also supports advanced shell commands’ history manipulation, global and local environment variables, plugins, an advanced help system, and more. The author describes it as a mix of Atuin and DirEnv. Nish is based on Nim, a language not commonly used in the Drop.</li><li>The post also introduces “await”, a C-based tool designed to run a list of commands in parallel and wait for their termination. It provides examples of how to use await in various scenarios, such as waiting for specific file type changes, waiting for a website to fail, and checking if the user is in a specific location.</li><li>Lastly, the post mentions “slugify”, a bash script by Ben Linton that is useful for renaming files and directories with spaces and underscores in their names. The author finds it especially handy for dealing with files named with spaces and underscores, which they find uncivilized.</li></ul> <p><strong>Nish</strong></p><p></p>Photo by Alan Cabello on <a href="https://www.pexels.com/photo/grey-conch-shell-on-shore-917486/" rel="nofollow noopener" target="_blank">Pexels.com</a><p>(If you’re “anti-Nim” due to some comments from the primary developer/maintainer of this nascent language, def move on to the other two sections.)</p><p><a href="https://forum.nim-lang.org/t/10975" rel="nofollow noopener" target="_blank">Nish</a>&nbsp;(<a href="https://github.com/thindil/nish" rel="nofollow noopener" target="_blank">GH</a>) is a new, non-POSIX, multiplatform command-line “super” shell, similar to zsh, bash, or fish, currently in the beta stage. It offers features such as tab completion, syntax highlighting, variables, aliases, and a (SQLite) database to store all shell-related data. This includes configuration, history, variables, and aliases, which enabled features such as searching through CLI history in more advanced ways than with existing shells.</p><p>It also supports global and local aliases, advanced shell commands and shell configuration, history manipulation, global/local environment variables, and plugins. More features include a new take on a help system, syntax highlighting for entered commands (based on validity), and suggestions for commands when one enters an unknown command. Extra features also include setting the terminal title, a theming system, and the ability to execute commands with or without the system’s default shell (which nish runs atop of). It also allows for setting the precision of suggestions and disabling/enabling various features through the shell’s options.</p><p>The author describes it as a mix of&nbsp;<a href="https://github.com/atuinsh/atuin" rel="nofollow noopener" target="_blank">Atuin</a>&nbsp;and&nbsp;<a href="https://github.com/direnv/direnv" rel="nofollow noopener" target="_blank">DirEnv</a>, and this is somewhat appropro, given that you actually interact with the shell you started in (hence, me calling it a “super” shell).</p><p>I verified that it works on Linux and doesn’t do anything skeezy, but I won’t have time to put it through any paces for a while.</p><p>As noted, it’s based on&nbsp;<a href="https://nim-lang.org/" rel="nofollow noopener" target="_blank">Nim</a>, a language we don’t tap into much in the Drop. You can use&nbsp;<a href="https://rosettacode.org/wiki/Category:Nim" rel="nofollow noopener" target="_blank">Rosetta Code</a>&nbsp;to see what Nim looks like in comparison to other languages.</p><p><strong>await</strong></p><p></p>Photo by samer daboul on <a href="https://www.pexels.com/photo/person-holding-hour-glass-1209999/" rel="nofollow noopener" target="_blank">Pexels.com</a><p>Asynchronous operations have been part of computing since the early days, and we spend a great deal of time in async-land when working in both client and server programming operations.</p><p>There are occasions where you need to spawn a bunch of commands and wait for them all to finish before continuing on with some other operation. There are (IMO clunky) ways to do this in various shells, but that can all be abstracted away with&nbsp;<a href="https://await-cli.app/" rel="nofollow noopener" target="_blank"><code>await</code></a>&nbsp;(<a href="https://github.com/slavaGanzin/await" rel="nofollow noopener" target="_blank">GH</a>). It’s a spiffy little C-based tool that’s designed to run a list of commands in parallel and wait for their termination. The footprint is super-small (28K!), and it “just works”.</p><p>Some examples it provides include:</p> <pre># action on specific file type changeswait 'stat **.c' --change --forever --exec 'gcc *.c -o await -lpthread'# waiting google (or your internet connection) to failawait 'curl google.com' --fail# waiting only google to fail (https://ec.haxx.se/usingcurl/usingcurl-returns)await 'curl google.com' --status 7# waits for redis socket and then connects toawait 'socat -u OPEN:/dev/null UNIX-CONNECT:/tmp/redis.sock' --exec 'redis-cli -s /tmp/redis.sock'# lazy versionawait 'ls /tmp/redis.sock'; redis-cli -s /tmp/redis.sock# daily checking if I am on french reviera. Just in caseawait 'curl https://ipapi.co/json 2&gt;/dev/null | jq .city | grep Nice' --interval 86400# Yet another server monitorawait "curl 'https://whatnot.ai' &amp;&gt;/dev/null &amp;&amp; echo 'UP' || echo 'DOWN'" --forever --change\ --exec "ntfy send \'whatnot.ai \1\'"# waiting for new iPhone in daemon modeawait 'curl "https://www.apple.com/iphone/" -s | pup ".hero-eyebrow text{}" | grep -v 12'\ --change --interval 86400 --daemon --exec "ntfy send \1"</pre> <p>I find it especially handy when waiting on Athena queries to finish.</p><p><strong>slugify</strong></p><p></p>Photo by Pixabay on <a href="https://www.pexels.com/photo/slug-158158/" rel="nofollow noopener" target="_blank">Pexels.com</a><p>I despise file and directory names with spaces and underscores in them. On top of that, I also have need to turn spaced words into “slugs” in various contexts, including shell scripts. I try to avoid relying on external programs in shell scripts, especially ones that are not generally, universally installed. Hence, Ben Linton’s&nbsp;<a href="https://github.com/benlinton/slugify" rel="nofollow noopener" target="_blank">slugify</a>&nbsp;bash script comes in handy.</p><p>It’s especially handy if you have a directory tree with files named by a monster of a human who uses spaces and worse in file/directory names. One run of the program, and they’re all renamed to something more civilized.</p> <p><a href="https://dailydrop.hrbrmstr.dev/?post_type=post&amp;p=139502511" rel="nofollow noopener" target="_blank">Subscribe</a></p> <p><strong>FIN</strong></p><p>Remember, you can follow and interact with the full text of The Daily Drop’s free posts on Mastodon via&nbsp;<code>@dailydrop.hrbrmstr.dev@dailydrop.hrbrmstr.dev</code>&nbsp;☮️</p><p><a href="https://dailydrop.hrbrmstr.dev/2024/02/12/bonus-drop-40-2024-02-12-what-the-shell/" rel="nofollow noopener" target="_blank">https://dailydrop.hrbrmstr.dev/2024/02/12/bonus-drop-40-2024-02-12-what-the-shell/</a></p><p><a rel="nofollow noopener" class="hashtag u-tag u-category" href="https://dailydrop.hrbrmstr.dev/tag/async/" target="_blank">#async</a> <a rel="nofollow noopener" class="hashtag u-tag u-category" href="https://dailydrop.hrbrmstr.dev/tag/await/" target="_blank">#await</a> <a rel="nofollow noopener" class="hashtag u-tag u-category" href="https://dailydrop.hrbrmstr.dev/tag/bash/" target="_blank">#bash</a> <a rel="nofollow noopener" class="hashtag u-tag u-category" href="https://dailydrop.hrbrmstr.dev/tag/ksh/" target="_blank">#ksh</a> <a rel="nofollow noopener" class="hashtag u-tag u-category" href="https://dailydrop.hrbrmstr.dev/tag/nim/" target="_blank">#nim</a> <a rel="nofollow noopener" class="hashtag u-tag u-category" href="https://dailydrop.hrbrmstr.dev/tag/parallel/" target="_blank">#parallel</a> <a rel="nofollow noopener" class="hashtag u-tag u-category" href="https://dailydrop.hrbrmstr.dev/tag/shell/" target="_blank">#shell</a></p>
nemo™ 🇺🇦<p>#2024 we <a href="https://mas.to/tags/await" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>await</span></a> you :D 👍</p>
robrich<p><a href="https://superfastpython.com/python-asyncio/" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">superfastpython.com/python-asy</span><span class="invisible">ncio/</span></a> - the complete guide to <a href="https://hachyderm.io/tags/async" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>async</span></a> &amp; <a href="https://hachyderm.io/tags/await" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>await</span></a> (the <a href="https://hachyderm.io/tags/AsyncIO" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>AsyncIO</span></a> library) in <a href="https://hachyderm.io/tags/Python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Python</span></a>. Great guide <a href="https://www.linkedin.com/in/jasonbrownlee/" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://www.</span><span class="">linkedin.com/in/jasonbrownlee/</span><span class="invisible"></span></a>.</p>
Jamie Magee :unverified:<p>Me doing asynchronous code refactoring in dotnet</p><p><a href="https://infosec.exchange/tags/dotnet" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>dotnet</span></a> <a href="https://infosec.exchange/tags/csharp" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>csharp</span></a> <a href="https://infosec.exchange/tags/async" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>async</span></a> <a href="https://infosec.exchange/tags/await" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>await</span></a> <a href="https://infosec.exchange/tags/asynchronous" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>asynchronous</span></a></p>
billseipel<p><span class="h-card"><a href="https://mamot.fr/@glacasa" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>glacasa</span></a></span> <br>How might this behave differently if the enclosing method were async? And the Task.Run removed...</p><p>And replaced 'using var scope' with 'await using var scope'.</p><p>Then invoking inside a for loop which collects Task&lt;T&gt; and calls WhenAll.</p><p><a href="https://fosstodon.org/tags/dotnet" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>dotnet</span></a> <a href="https://fosstodon.org/tags/csharp" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>csharp</span></a> <a href="https://fosstodon.org/tags/async" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>async</span></a> <a href="https://fosstodon.org/tags/await" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>await</span></a> <a href="https://fosstodon.org/tags/programming" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>programming</span></a></p>