class Async::Scheduler
def blocking_operation_wait(work)
@parameter work [Proc] The work to execute on a background thread.
@asynchronous May be non-blocking.
@public Since *Async v2.19* and *Ruby v3.4*.
Wait for the given work to be executed.
def blocking_operation_wait(work) thread = Thread.new(&work) result = thread.join thread = nil return result ensure thread&.kill end