Writing a task scheduler in Zig
I'm working on an application that needs the ability to schedule tasks. Many applications have a similar need, but requirements can vary greatly. Advanced cases might require persistence and distribution, typically depending on external systems (like a database or queue) to do much of the heavy lifting. My needs are simpler: I don't have a huge variety of tasks or a high number of them.
Writing a task scheduler in Zig May 09, 2024 I'm working on an application that needs the ability to schedule tasks. Many applications have a similar need, but requirements can vary greatly. Advanced cases might require persistence and distribution, typically depending on external systems (like a database or queue) to do much of the heavy lifting. My needs are simpler: I don't have a huge variety of tasks or a high number of them. If you're just looking for a working implementation, I've added this to my Zig Utility Library (zul) , with documentation . Thread-Per-Task At its simplest, we could
related reading
- Notes on structured concurrency, or: Go statement considered harmful - njs blogvorpus.org
- A half-hour to learn Rustfasterthanli.me
- Concurrency Patterns in Embedded Rust - Ferrous Systemsferrous-systems.com
- Using Threads to Run Code Simultaneously - The Rust Programming Languagedoc.rust-lang.org
- async/await on embedded Rust - Ferrous Systemsferrous-systems.com
- Zig explores structured concurrency [LWN.net]lwn.net
- Assorted thoughts on zig (and rust)scattered-thoughts.net
- Channels | Tokio - An asynchronous Rust runtimetokio.rs
- Designing a Concurrent Application | Learn You Some Erlang for Great Good!learnyousomeerlang.com
- Zig And Rustmatklad.github.io
- (Quite) A Few Words About Asyncyoric.github.io
- TypeScript Structured Concurrencythecandidstartup.org