Releases: patrick-kidger/tinyio
Releases · patrick-kidger/tinyio
tinyio v0.2.1
- Feature: added
tinyio.{to_asyncio, to_trio, from_asyncio, from_trio}for integrating with other event loops. - Bugfix: calling
loop.runwhilst it is already running will now correctly raise an error. - Bugfix: calling
loop.runon an already-completed coroutine will no longer returnNone.
Full Changelog: v0.2.0...v0.2.1
tinyio v0.2.0
A couple of breaking changes to tidy up our interface:
- Removed
tinyio.add_done_callback. This was literally justout = yield coro; success_callback(out)so it's pretty trivial for a user to write as a wrapper coroutine themselves (and in the same number of function definitions, as they previously had to write the callback anyway). - Switched from
iterator = tinyio.AsCompleted(...)toiterator = yield tinyio.as_completed(...). In particular these tasks are scheduled in the background at the moment of this newyield, rather than on the firstget. This should make multi-consumer cases a bit more natural.
I think I'm pretty happy with what the API is now settling down to look like.
Full Changelog: v0.1.4...v0.2.0
tinyio v0.1.4
- Performance: we now use a proper event-based system to notify when to wake up the event loop (rather than leaving it busy-polling). This is a fairly major rewrite of our internals! And correspondingly we are now only '300 lines'-tiny rather than '200 lines'-tiny.
- Feature:
tinyio.Event.waitnow supports timeouts. - Feature: added
tinyio.Event.clearto un-set an event. - QoL: added a guardrail to prevent
yielding on an already-completed coroutine that the loop has not seen before. - QoL: added a guardail to prevent performing
if event:instead ofif event.is_set(): - QoL: if multiple
.run_in_threads all error out at the same time, then this is handled appropriately.
Full Changelog: v0.1.3...v0.1.4
tinyio v0.1.3
We now ship batteries-included with the usual collection of standard operations. No changes to the core event loop, these are all just the obvious implementations on top of it:
tinyio.add_done_callbacktinyio.AsCompletedtinyio.Barriertinyio.Eventtinyio.Locktinyio.Semaphoretinyio.ThreadPooltinyio.timeout
Hopefully we can include these without invalidating the 'tiny' in our name! 😁
Full Changelog: v0.1.2...v0.1.3
tinyio v0.1.2
What's Changed
- typo fix by @davidbrochart in #2
- Added ability to schedule work in the background. by @patrick-kidger in #3
New Contributors
- @davidbrochart made their first contribution in #2
Full Changelog: https://github.com/patrick-kidger/tinyio/commits/v0.1.2