A minimal asyncronous framework.
To use this package, run the following command in your project's root directory:
Put the following dependency into your project's dependences section:
A small asyncronous framework for everyone.
The code in this repository is licensed under AGPL-3.0-or-later; for more details see the
LICENSE file in the repository.
This library aims to have an small but complete asyncronous solution for dlang programs.
It's based around
await; a simple example would be:
import core.time : seconds; import ninox.async.timeout : timeout; timeout(seconds(5)).await();
timeout had a signature of
TimeoutFuture timeout(Duration dur); where
The future itselv implements
T await(); which can be called to await the future and get the result; in out case here
a timeout dosnt produce a value.
To use futures, you must be in an fiber, and to achive that you simply schedule your function:
import ninox.async : gscheduler; gscheduler.schedule(&someFunc);
main-function also should call
gscheduler.loop(); before it's end to actually start the whole eventloop.
- improve handling / distinction of io-events
- improve way we handle futures: would like to get rid of spin-lock like codeflow
- add more io futures:
- chunked file io
- improve socket based io by making the underlaying socket non-blocking
- add signalhandlers for
- support more platforms like windows and osx
- add thread-pool support
- add more library features such as arbitary streams
- add async variant of
captureAllto be paralell instead of linear
- Registered by Mai Lapyst
- 1.1.2 released 14 days ago
- Copyright © 2023, Mai-Lapyst
1.1.2 2023-Nov-25 1.1.1 2023-Nov-10 1.1.0 2023-Nov-08 1.0.0 2023-Jul-09 ~master 2023-Nov-25
- Download Stats:
0 downloads today
0 downloads this week
23 downloads this month
40 downloads total
- Short URL: