Conversation
shortens count down
disables check because of errors with #[async_std::main]
There was a problem hiding this comment.
Hi, thanks for opening this PR! -- In the top-level documentation we explain in more detail how the task model works. However it seems we don't link to it from this function which we probably should.
I'm not sure if this example is the best way to convey how task::spawn works. Instead it may be more effective to adapt the std::thread::spawn documentation to cover async_std::task::spawn:
The join handle will implicitly detach the child task upon being dropped. In this case, the child task may outlive the parent [...]
|
Yes, the toplevel description. Would have helped me. |
|
@tronta hah, yay glad that would've helped -- I would prefer we adapt the docs from |
As I struggled using the function spawn properly (I didn't get that it can be executed without await :-( ), I'd like to add an other example.