med-mastodon.com is one of the many independent Mastodon servers you can use to participate in the fediverse.
Medical community on Mastodon

Administered by:

Server stats:

357
active users

#async

1 post1 participant0 posts today
madomado<p><code>glib</code> asynchronous programming in <a href="https://fedi.fyralabs.com/tags/nim" rel="nofollow noopener noreferrer" target="_blank">#nim</a><span> is… not the best idea.<br><br></span><a href="https://fedi.fyralabs.com/tags/async" rel="nofollow noopener noreferrer" target="_blank">#async</a></p>
screwlisp<p>How I normally do <a href="https://gamerplus.org/tags/async" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>async</span></a> external programs in my <a href="https://gamerplus.org/tags/commonLisp" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>commonLisp</span></a> image <a href="https://gamerplus.org/tags/embeddableCommonLisp" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>embeddableCommonLisp</span></a> and <a href="https://gamerplus.org/tags/uiop" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>uiop</span></a> (in the notes).</p><p><a href="https://screwlisp.small-web.org/programming/embeddable-common-lisp-external-process-multi-processing-eg/" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">screwlisp.small-web.org/progra</span><span class="invisible">mming/embeddable-common-lisp-external-process-multi-processing-eg/</span></a></p><p>Originally I was writing Kittenette (Closette but for kittens) today, but I ended up wanting to individually treat external processes, especially from <a href="https://gamerplus.org/tags/ecl" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>ecl</span></a> on its own first.</p><p>My example is particularly using <a href="https://gamerplus.org/tags/cat" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>cat</span></a>(1) as an external-process in-memory echo server.</p><p>Hope it helps someone. <a href="https://gamerplus.org/tags/programming" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>programming</span></a> <a href="https://gamerplus.org/tags/example" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>example</span></a> </p><p>Yes "multi-processing" in the url is ~erroneous.</p>
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 noreferrer" target="_blank">#<span>async</span></a> / <a href="https://mastodon.bsd.cafe/tags/await" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>await</span></a> in <a href="https://mastodon.bsd.cafe/tags/C" class="mention hashtag" rel="nofollow noopener noreferrer" 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 noreferrer" 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 noreferrer" 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 noreferrer" target="_blank">#<span>POSIX</span></a> user <a href="https://mastodon.bsd.cafe/tags/context" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>context</span></a> <a href="https://mastodon.bsd.cafe/tags/switching" class="mention hashtag" rel="nofollow noopener noreferrer" 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 noreferrer" target="_blank">#<span>Linux</span></a> (<a href="https://mastodon.bsd.cafe/tags/glibc" class="mention hashtag" rel="nofollow noopener noreferrer" 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 noreferrer" 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>
jnpn<p>Great series on asynchronous basic blocks</p><p><a href="https://natkr.com/tags/async-from-scratch-series/" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">natkr.com/tags/async-from-scra</span><span class="invisible">tch-series/</span></a></p><p><a href="https://mastodon.social/tags/rust" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>rust</span></a> <a href="https://mastodon.social/tags/async" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>async</span></a> <a href="https://mastodon.social/tags/series" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>series</span></a></p>
Eric Mann<p>Taking the stage at <a href="https://tekton.network/tags/phptek" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>phptek</span></a> to talk about <a href="https://tekton.network/tags/async" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>async</span></a> <a href="https://tekton.network/tags/PHP" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>PHP</span></a>.</p><p>Follow along with my slides =&gt; <a href="https://gamma.app/docs/I-Promise-to-Teach-You-Asynchronous-PHP-syrddpjuls19nbz" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">gamma.app/docs/I-Promise-to-Te</span><span class="invisible">ach-You-Asynchronous-PHP-syrddpjuls19nbz</span></a></p><p>Feel free to ask questions and follow up!</p>
Felix Palmen :freebsd: :c64:<p>Now that <a href="https://mastodon.bsd.cafe/tags/swad" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>swad</span></a> 0.7 is released, it's time to prepare a new release of <a href="https://mastodon.bsd.cafe/tags/poser" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>poser</span></a>, my own lib supporting <a href="https://mastodon.bsd.cafe/tags/services" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>services</span></a> on <a href="https://mastodon.bsd.cafe/tags/POSIX" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>POSIX</span></a> systems, following a <a href="https://mastodon.bsd.cafe/tags/reactor" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>reactor</span></a> with <a href="https://mastodon.bsd.cafe/tags/threadpool" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>threadpool</span></a> design.</p><p>During development of swad, I moved poser from using strictly only POSIX APIs (with the scalability limits of e.g. <a href="https://mastodon.bsd.cafe/tags/select" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>select</span></a>) to auto-detected support for <a href="https://mastodon.bsd.cafe/tags/kqueue" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>kqueue</span></a>, <a href="https://mastodon.bsd.cafe/tags/epoll" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>epoll</span></a>, <a href="https://mastodon.bsd.cafe/tags/eventports" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>eventports</span></a>, <a href="https://mastodon.bsd.cafe/tags/signalfd" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>signalfd</span></a> and <a href="https://mastodon.bsd.cafe/tags/timerfd" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>timerfd</span></a> (so now it could, in theory(!), "compete" with e.g. libevent). I also fixed quite some hidden bugs, and added more base functionality, like a <a href="https://mastodon.bsd.cafe/tags/dictionary" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>dictionary</span></a> using nested hashtables internally, or <a href="https://mastodon.bsd.cafe/tags/async" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>async</span></a> tasks mimicking the async/await pattern known from e.g, <a href="https://mastodon.bsd.cafe/tags/csharp" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>csharp</span></a>. I also deprecated two features, the periodic and global "service tick" (superseded by individual timers) and the "resolve hosts" property of a "connection" (superseded by a separate resolve class).</p><p>I'll have to decide on a few things, e.g. whether I'll remove the deprecated stuff immediately and bump the major version of the "posercore" lib. I guess I'll do just that. I'd also like to add all the web-specific stuff (http 1.0/1.1 server) that's currently part of the swad code as a "poserweb" lib. This would get a major version of 0, indicating a generally unstable API/ABI as of now....</p><p>And then, I'd have to decide where certain utility classes belong to. The rate limiter is probably useful for things other than web, so it should probably go to core. What about url encoding/decoding, for example? 🤔</p><p>Stay tuned, something will come here, maybe helping you to write a nice service in plain <a href="https://mastodon.bsd.cafe/tags/C" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>C</span></a> 😎:</p><p><a href="https://github.com/Zirias/poser" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="">github.com/Zirias/poser</span><span class="invisible"></span></a></p>
Jan :rust: :ferris:<p>Bach - by camshaft</p><p><a href="https://github.com/camshaft/bach" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="">github.com/camshaft/bach</span><span class="invisible"></span></a></p><p>from their README:</p><p>"Bach is a <a href="https://floss.social/tags/Rust" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Rust</span></a>-based framework for simulating and testing complex async/await-based systems in a non-real-time environment. It's capable of modeling network protocols, queueing systems, and concurrent task interactions with testing and visualization tools."</p><p>Wow, this crate looks awesome and very underrated (by the number of Github stars).</p><p><a href="https://floss.social/tags/RustLang" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>RustLang</span></a> <a href="https://floss.social/tags/CrateTip" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>CrateTip</span></a> <a href="https://floss.social/tags/Async" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Async</span></a> <a href="https://floss.social/tags/Fuzzing" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Fuzzing</span></a> <a href="https://floss.social/tags/SimulationTesting" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>SimulationTesting</span></a> <a href="https://floss.social/tags/Network" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Network</span></a> <a href="https://floss.social/tags/Concurrency" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Concurrency</span></a></p>
Andrija Petrovic<p>A gem of its own<br><a href="https://natkr.com/2025-04-10-async-from-scratch-1/" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">natkr.com/2025-04-10-async-fro</span><span class="invisible">m-scratch-1/</span></a><br><a href="https://floss.social/tags/rust" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>rust</span></a> <a href="https://floss.social/tags/rustlang" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>rustlang</span></a> <a href="https://floss.social/tags/async" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>async</span></a></p>
Tim<p>Really great visualization of async timing in Rust with Tokio.</p><p><a href="https://github.com/alexpusch/rust-magic-patterns/blob/master/visual-journey-through-async-rust/Readme.md?__readwiseLocation=" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">github.com/alexpusch/rust-magi</span><span class="invisible">c-patterns/blob/master/visual-journey-through-async-rust/Readme.md?__readwiseLocation=</span></a></p><p><a href="https://mastodon.social/tags/dataviz" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>dataviz</span></a> <a href="https://mastodon.social/tags/rustlang" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>rustlang</span></a> <a href="https://mastodon.social/tags/async" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>async</span></a> <a href="https://mastodon.social/tags/tokio" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>tokio</span></a></p>
KrebsOnSecurity RSS<p>DOGE Worker’s Code Supports NLRB Whistleblower</p><p><a href="https://krebsonsecurity.com/2025/04/doge-workers-code-supports-nlrb-whistleblower/" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">krebsonsecurity.com/2025/04/do</span><span class="invisible">ge-workers-code-supports-nlrb-whistleblower/</span></a></p><p> <a href="https://burn.capital/tags/DepartmentofHealthandHumanServices" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>DepartmentofHealthandHumanServices</span></a> <a href="https://burn.capital/tags/DepartmentofGovernmentEfficiency" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>DepartmentofGovernmentEfficiency</span></a> <a href="https://burn.capital/tags/NationalLaborRelationsBoard" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>NationalLaborRelationsBoard</span></a> <a href="https://burn.capital/tags/TheWallStreetJournal" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>TheWallStreetJournal</span></a> <a href="https://burn.capital/tags/async" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>async</span></a>-ip-rotator <a href="https://burn.capital/tags/ALittleSunshine" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>ALittleSunshine</span></a> <a href="https://burn.capital/tags/DanielJ" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>DanielJ</span></a>.Berulis <a href="https://burn.capital/tags/LaborDepartment" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>LaborDepartment</span></a> <a href="https://burn.capital/tags/TheComingStorm" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>TheComingStorm</span></a> <a href="https://burn.capital/tags/Browserless" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Browserless</span></a> <a href="https://burn.capital/tags/MarkoElez" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>MarkoElez</span></a> <a href="https://burn.capital/tags/Integuru" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Integuru</span></a> <a href="https://burn.capital/tags/Politico" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Politico</span></a> <a href="https://burn.capital/tags/Ge0rg3" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Ge0rg3</span></a> <a href="https://burn.capital/tags/GitHub" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>GitHub</span></a> <a href="https://burn.capital/tags/DOGE" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>DOGE</span></a></p>
jexner 🏳️‍🌈<p>So, question for the <a href="https://tooting.ch/tags/Android" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Android</span></a> <a href="https://tooting.ch/tags/Kotlin" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Kotlin</span></a> crowd: I have a process that is async (upload of a file), and that needs to be run a bunch of times. If I start each upload in a loop, I cannot really cancel or observe, bcs it is retrofit/okhttp who is managing the async stuff and the loop ends fast.<br>It is entirely possible that every now and again, I have to upload a lot of those files, and not being able to cancel is not acceptable.<br>So, what are my options?<br><a href="https://tooting.ch/tags/BuildInPublic" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>BuildInPublic</span></a> <a href="https://tooting.ch/tags/async" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>async</span></a> <a href="https://tooting.ch/tags/FollowerPower" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>FollowerPower</span></a></p>
Felix Palmen :freebsd: :c64:<p>Today, I implemented the <a href="https://mastodon.bsd.cafe/tags/async" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>async</span></a> / <a href="https://mastodon.bsd.cafe/tags/await" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>await</span></a> pattern (as known from <a href="https://mastodon.bsd.cafe/tags/csharp" class="mention hashtag" rel="nofollow noopener noreferrer" 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 noreferrer" 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 noreferrer" target="_blank">#<span>POSIX</span></a> user context switching with <a href="https://mastodon.bsd.cafe/tags/getcontext" class="mention hashtag" rel="nofollow noopener noreferrer" 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 noreferrer" target="_blank">#<span>FreeBSD</span></a>, <a href="https://mastodon.bsd.cafe/tags/NetBSD" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>NetBSD</span></a>, <a href="https://mastodon.bsd.cafe/tags/Linux" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Linux</span></a> (with <a href="https://mastodon.bsd.cafe/tags/glibc" class="mention hashtag" rel="nofollow noopener noreferrer" 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 noreferrer" 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 noreferrer" 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 noreferrer" target="_blank">#<span>C</span></a> <a href="https://mastodon.bsd.cafe/tags/coding" class="mention hashtag" rel="nofollow noopener noreferrer" 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 noreferrer" target="_blank">#<span>thread</span></a> controlling the pam helper <a href="https://mastodon.bsd.cafe/tags/process" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>process</span></a> in <a href="https://mastodon.bsd.cafe/tags/swad" class="mention hashtag" rel="nofollow noopener noreferrer" 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 noreferrer" 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 noreferrer" 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 noreferrer" target="_blank">#<span>async</span></a> / <a href="https://mastodon.bsd.cafe/tags/await" class="mention hashtag" rel="nofollow noopener noreferrer" 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 noreferrer" target="_blank">#<span>POSIX</span></a>-1.2001 <a href="https://mastodon.bsd.cafe/tags/getcontext" class="mention hashtag" rel="nofollow noopener noreferrer" 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 noreferrer" target="_blank">#<span>FreeBSD</span></a>, <a href="https://mastodon.bsd.cafe/tags/NetBSD" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>NetBSD</span></a>, <a href="https://mastodon.bsd.cafe/tags/Linux" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Linux</span></a> (with <a href="https://mastodon.bsd.cafe/tags/glibc" class="mention hashtag" rel="nofollow noopener noreferrer" 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 noreferrer" 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 noreferrer" target="_blank">#<span>C</span></a> <a href="https://mastodon.bsd.cafe/tags/coding" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>coding</span></a></p>
argv minus one<p>Do any operating systems other than <a href="https://mastodon.sdf.org/tags/Linux" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Linux</span></a> (<a href="https://mastodon.sdf.org/tags/Windows" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Windows</span></a>, <a href="https://mastodon.sdf.org/tags/macOS" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>macOS</span></a>, <a href="https://mastodon.sdf.org/tags/FreeBSD" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>FreeBSD</span></a>, <a href="https://mastodon.sdf.org/tags/OpenBSD" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>OpenBSD</span></a>, etc) have an API for non-blocking file IO?</p><p>I know Linux has that in <a href="https://mastodon.sdf.org/tags/io_uring" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>io_uring</span></a>, which can do almost any IO operation (even fsync) in the background and tell you when it's done, but is that the only OS with such a feature?</p><p><a href="https://mastodon.sdf.org/tags/programming" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>programming</span></a> <a href="https://mastodon.sdf.org/tags/async" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>async</span></a></p>
Natalie<p>Decided to write a tutorial..ish..thing? on "<a href="https://hachyderm.io/tags/async" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>async</span></a> <a href="https://hachyderm.io/tags/Rust" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Rust</span></a> beyond just the `async fn`". A short post turned into a way too long one turned into the start of a series... but at least it's a beginning.</p><p><a href="https://natkr.com/2025-04-10-async-from-scratch-1/" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">natkr.com/2025-04-10-async-fro</span><span class="invisible">m-scratch-1/</span></a></p>
Hacker News<p>Deterministic simulation testing for async Rust</p><p><a href="https://s2.dev/blog/dst" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="">s2.dev/blog/dst</span><span class="invisible"></span></a></p><p><a href="https://mastodon.social/tags/HackerNews" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>HackerNews</span></a> <a href="https://mastodon.social/tags/Deterministic" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Deterministic</span></a> <a href="https://mastodon.social/tags/simulation" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>simulation</span></a> <a href="https://mastodon.social/tags/testing" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>testing</span></a> <a href="https://mastodon.social/tags/async" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>async</span></a> <a href="https://mastodon.social/tags/Rust" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Rust</span></a> <a href="https://mastodon.social/tags/RustLang" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>RustLang</span></a> <a href="https://mastodon.social/tags/Testing" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Testing</span></a> <a href="https://mastodon.social/tags/Techniques" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Techniques</span></a> <a href="https://mastodon.social/tags/DevCommunity" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>DevCommunity</span></a></p>
Kevin P. Fleming<p>Python friends:</p><p>I have a desire to build a small program for testing a piece of hardware I am designing. This program will need to have a REPL so the user can invoke various configuration and test commands while connected to the device, but also asynchronously handle data arriving from that device and displaying it.</p><p>Can anyone suggest packages and/or a strategy for doing this?</p><p><a href="https://mastodon.km6g.us/tags/Python" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Python</span></a> <a href="https://mastodon.km6g.us/tags/Async" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Async</span></a></p>
Sam Cooper<p>I was cited in an academic paper! It studies potential bugs in <a class="hashtag" href="https://bsky.app/search?q=%23async" rel="nofollow noopener noreferrer" target="_blank">#async</a> <a class="hashtag" href="https://bsky.app/search?q=%23Kotlin" rel="nofollow noopener noreferrer" target="_blank">#Kotlin</a> programs when developers aren't familiar with <a class="hashtag" href="https://bsky.app/search?q=%23coroutines" rel="nofollow noopener noreferrer" target="_blank">#coroutines</a> and suspending functions. So cool that TWO of my investigation write-ups were included in this great research 🐞🔬🧑‍💻 <a href="https://doi.org/10.4230/LIPIcs.ECOOP.2024.8" rel="nofollow noopener noreferrer" target="_blank">doi.org/10.4230/LIPI...</a></p>
Aral Balkan<p>New Kitten update</p><p>• 🥳 Kitten HTML templates and kitten.Component render functions can now be async.</p><p><a href="https://kitten.small-web.org" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="">kitten.small-web.org</span><span class="invisible"></span></a></p><p>This is quite a big one and it took me finally biting the bullet and getting my head around generators in JavaScript to implement properly.</p><p>So now you can mix synchronous and asynchronous components as you like and if there are any asynchronous components in your templates they will automatically be awaited (even if you forget to use await) ;)</p><p>I’ll write a proper post/tutorial/documentation for it soon but for the time being enjoy the screenshots where a layout template gets the latest three posts from my mock fediverse public timeline service and displays them on the page.</p><p>The kitten.Component version also has a refresh button that streams a different three to the page.</p><p>For those of you unfamiliar with Kitten, this is all the code in either example. No scaffolding, nothing. Pop either into a file called index.page.js and run kitten in that folder and visit https://localhost to see the example run.</p><p>Enjoy!</p><p>:kitten:💕</p><p><a href="https://mastodon.ar.al/tags/Kitten" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Kitten</span></a> <a href="https://mastodon.ar.al/tags/SmallWeb" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>SmallWeb</span></a> <a href="https://mastodon.ar.al/tags/async" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>async</span></a> <a href="https://mastodon.ar.al/tags/components" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>components</span></a> <a href="https://mastodon.ar.al/tags/templates" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>templates</span></a> <a href="https://mastodon.ar.al/tags/HTML" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>HTML</span></a> <a href="https://mastodon.ar.al/tags/CSS" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>CSS</span></a> <a href="https://mastodon.ar.al/tags/JavaScript" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>JavaScript</span></a> <a href="https://mastodon.ar.al/tags/NodeJS" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>NodeJS</span></a> <a href="https://mastodon.ar.al/tags/generators" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>generators</span></a> <a href="https://mastodon.ar.al/tags/web" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>web</span></a> <a href="https://mastodon.ar.al/tags/dev" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>dev</span></a></p>
Hacker News<p>Philosophy of Coroutines (2023)</p><p><a href="https://www.chiark.greenend.org.uk/~sgtatham/quasiblog/coroutines-philosophy/" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://www.</span><span class="ellipsis">chiark.greenend.org.uk/~sgtath</span><span class="invisible">am/quasiblog/coroutines-philosophy/</span></a></p><p><a href="https://mastodon.social/tags/HackerNews" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>HackerNews</span></a> <a href="https://mastodon.social/tags/Philosophy" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Philosophy</span></a> <a href="https://mastodon.social/tags/Coroutines" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Coroutines</span></a> <a href="https://mastodon.social/tags/Programming" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Programming</span></a> <a href="https://mastodon.social/tags/Async" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Async</span></a> <a href="https://mastodon.social/tags/Development" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Development</span></a></p>