Rework implementation to use `Fiber#transfer`. Fixes #23.
Ruby 3 allows mixing `Fiber#resume/#yield` and `Fiber#transfer`. We can take advantage of that to minimise the impact of non-blocking operations on user flow control. Previously, non-blocking operations would invoke `Fiber.yield` and this was a user-visible side-effect. We did take advantage of it, but it also meant that integration of Async with existing usage of Fiber could be problematic. We tracked the most obvious issues in `enumerator_spec.rb`. Now, non-blocking operations transfer directly to the scheduler fiber and thus don't impact other usage of resume/yield.
S
Samuel Williams committed
00de67c38e1ffeb40785901c353aeabb54013ade
Parent: a55ad6d