Open matklad opened 6 years ago
We do not (currently) provide threading primitives beyond std::thread::spawn
May is mentioned as a library the user might be interested in, that could be used alongside ergo_sync if someone had that use case/need.
If you think the docs here could be improved, let me know!
Hm, yeah, I’ve skimmed the docs too fast :-) However, I would still advise against promoting may: it may lead to ub if TLS is used, and a lot of stuff in Rust uses or may use TLS.
See https://github.com/Xudong-Huang/may/issues/6 for the context, and the implementation of the go! macro which masks unsafety without providing any kind of guarantees: https://github.com/Xudong-Huang/may/blob/e2312d5871bfea5b1f4a0f89aafa59c7cff880b9/src/macros.rs#L19
Disclaimer: I have not used may, and I am not an expert in coroutines, so I might be embarrassingly wrong here :)
I did notice that in their docs. I can point it out explicitly in ergo_sync
's docs as well. Thanks!
The docs mention the may library, but it isn’t even in Cargo.toml. BTW, may is an unsafe library, so I am not sure if it is a good idea to promote it...