Skip to content

Getting there...

Compare
Choose a tag to compare
@RouquinBlanc RouquinBlanc released this 10 Nov 15:59

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 of start_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!