Reactor, fiber scheduler and async in Ruby 3.0
igor.khasilev at gmail.com
Thu Dec 31 17:21:19 UTC 2020
On Thursday, 31 December 2020 at 16:32:17 UTC, Adam D. Ruppe
> On Thursday, 31 December 2020 at 14:53:52 UTC, Jacob Carlborg
>> The existing IO related methods in the core/standard library
>> has been updated to be fiber scheduler aware. That basically
>> means that if there is no fiber scheduler set, the IO
>> operations will be blocking. If a fiber scheduler has been
>> set, they will instead be non-blocking.
> omg that's a really good idea.
> Over the weekend I wrote a Phobos subclass
> that does fiber sockets. Pretty simple code really.
Yes, this is how I implemented this in my event loop framework:
Then your application can just ignore details of underlying
socket implementation (it can be std.socket or unblocking sockets
with event loop)
More information about the Digitalmars-d