You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Beam is a fiber-based lightweight executor. Beam scheduled on IO operations and transfer back when IO is ready, so in most cases we can use beams to instead threads to gain better performance.
LightIO::Watchers::IO
Watchers::IO is a way to make beams collaborate with 'raw' ruby socket / io objects.
watcher.wait_read will trigger a beam schedule, you must invoke Watchers::IO#wait_read or Watchers::IO#wait_write before actually read or write socket, otherwise all beams will blocking until socket is readable/writeable.
LightIO::Library provide Beam compatible libraries, LightIO::Library include same name classes or methods in ruby stdlib, for example use LightIO::Library::Queue to instead Queue from stdlib.
You can access LightIO::Library classes from LightIO namespace for convenient, like LightIO::Timeout.timeout.