module
Rubellite::Concurrency
Defined in:
rubellite/concurrency.crClass Method Summary
-
.with_gvl(&block : -> U) : U forall U
Runs a Crystal block while holding the Ruby GVL (from a thread that currently doesn't hold it).
-
.without_gvl(&block : -> U) : U forall U
Runs a Crystal block with the Ruby Global VM Lock (GVL) released.
Class Method Detail
def self.with_gvl(&block : -> U) : U forall U
#
Runs a Crystal block while holding the Ruby GVL (from a thread that currently doesn't hold it).
def self.without_gvl(&block : -> U) : U forall U
#
Runs a Crystal block with the Ruby Global VM Lock (GVL) released. Allows other Ruby threads to run concurrently while this thread performs blocking I/O, waiting on channels, or heavy computations.