najamelan / async_nursery Goto Github PK
View Code? Open in Web Editor NEWPrimitive for structured concurrency.
Home Page: https://docs.rs/async_nursery
License: The Unlicense
Primitive for structured concurrency.
Home Page: https://docs.rs/async_nursery
License: The Unlicense
If the tracing
feature of this crate is enabled without also enabling the implementation
feature (e.g. default-features = false
):
error[E0432]: unresolved import `futures`
--> /home/teohhanhui/.cargo/registry/src/github.com-1ecc6299db9ec823/async_nursery-0.4.0/src/tracing.rs:5:2
|
5 | futures :: { FutureExt } ,
| ^^^^^^^ use of undeclared crate or module `futures`
Right now, I use the function: fn nurse( &self, fut: impl Future<Output = Out> + Send + 'static ) -> Result<(), NurseErr>;
This unfortunately means I can't use references in my async fn
with a lifetime less than 'static
, which is quite inconvenient.
I'm not really sure of the complexity of changing that, but I'd appreciate any thoughts you have on it.
For example, in my library I have an interval
function which takes a Nurse<_>
and calls NurseExt<_>
methods on it:
Currently, every user of my library would be forced to bring in a whole lot of dependencies, even if they don't use this interval
function.
This is because async_nursery
depends on async_executors
and futures
.
From what I can see, if we were to split into a crate such as async_nursery_core
, which includes:
It only needs to have these dependencies:
futures-channel
:
TrySendError
futures-task
:
FutureObj
LocalFutureObj
SpawnError
And we shouldn't run afoul of coherence rules, since struct Nursery<_, _>
and struct NurseryStream<_, _>
will both still be defined in the async_nursery
crate.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.