SaaSHub helps you find the best software and product alternatives Learn more →
Top 11 structured-concurrency Open-Source Projects
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
-
FuncSug
An alternative to event-driven programming: a programming language without callbacks to enable you to follow your scenario in GUI programming thanks to additional control flow instructions (structured concurrency)
Project mention: Show HN: A pure C89 implementation of Go channels, with blocking selects | news.ycombinator.com | 2023-12-13libmill (https://github.com/sustrik/libmill) and libdill (https://github.com/sustrik/libdill) should be similar and probably mentioned.
As far as I understand the differences between CspChan and libmill might be that libmill also implements lightweight tasks (coroutines) and everything that goes with it (IO multiplexing, async timers, etc), while CspChan uses OS threads?
When using green threads/fibers/coroutines, an interesting technique to make signal handling safer is to run the signal handler asynchronously on a separate fiber/green thread. That way most of the problems of dealing with signals go away, and there's basically no limitation on what you can do inside the signal handler.
I've successfully used this technique in Polyphony [1], a fiber-based Ruby gem for writing concurrent programs. When a signal occurs, Polyphony creates a special-purpose fiber that runs the signal handling code. The fiber is put at the head of the run queue, and is resumed once the currently executed fiber yields control.
[1] https://github.com/digital-fabric/polyphony
Have a look at effection,which seems to share some ideas: https://frontside.com/effection
There are a number of crates that provides APIs such as race, my favorite is futures-concurrency, but there are also futures::future::select_all, tokio::select, and others.
Project mention: Ask HN: What Python libraries do you wish more people knew about? | news.ycombinator.com | 2023-12-03
I do that of course, and that's one of the easiest ways to use async Rust. In real projects you need much more however. F.ex. I had to code an example of how to add tasks to an already running pool of tasks and posted my findings here: https://github.com/dimitarvp/rust-async-examples/blob/main/e... (there's #2 as well with some more comments and a different approach).
The fact that I needed to make a GitHub repo and start making show-and-tell demos on how to do various things with async Rust to me is both a red flag and me being diligent BUT it should be more obvious. And promoted in docs.
Rust started suffering from "you got all the nuts and bolts in place, now build your own solution, son" syndrome which I grew to dislike. Too low-level. I wouldn't mind something akin to e.g. Golang's flowmatic library (check the first two examples at the top of the README): https://github.com/carlmjohnson/flowmatic
structured-concurrency related posts
-
A more natural API for JavaScript generators
-
Effection 3.0 – Structured Concurrency and Effects for JavaScript
-
Show HN: A pure C89 implementation of Go channels, with blocking selects
-
Philosophy of Coroutines
-
Polyphony: Fine-Grained Concurrency for Ruby
-
[ANN] ki-1.0.0.2 fixes a small correctness bug
-
ki 1.0.0: a lightweight structured concurrency library
-
A note from our sponsor - SaaSHub
www.saashub.com | 10 May 2024
Index
What are some of the best open-source structured-concurrency projects? This list will help you:
Project | Stars | |
---|---|---|
1 | trio | 5,903 |
2 | libdill | 1,669 |
3 | SwiftCoroutine | 832 |
4 | Polyphony | 651 |
5 | effection | 492 |
6 | futures-concurrency | 365 |
7 | tractor | 250 |
8 | flowmatic | 244 |
9 | ki | 76 |
10 | lusc | 15 |
11 | FuncSug | 5 |
Sponsored