Getting there...
Changes:
- Nursery now inherits from Future; we don't need the _done internal future anymore!
- There is no more start function, which was overkill and annoying when used without context manager
- No more internal state. Use Future state to know how it went
- Most of the logs are now debugs
- We can now
fork
a Nursery! just use the child Nursery as usual, but:- child nursery can be launched with the same parameters as a task
- child nursery will be cancelled with parent (yeah!)
- but an error in child will not cancel the parent directly
Nursery.set_debug
allows to enable internal logging- Implementation of the
<<
operator as en equivalent ofstart_soon
- add join(forever=True) capability to get a never auto-cancelling Nursery
- add a provisional
Nursery.get_tasks
method to retrieve all tasks of a scope - improved documentation
If you are working with this package already since 0.2, this will not change much.
Just be careful, next release will rename Nursery
into Scope
and start_soon
into spawn
!