Skip to content

Commit a49c5de

Browse files
samuel-williams-shopifyioquatix
authored andcommitted
Restore blocking_operation_wait hook.
1 parent 7b2075f commit a49c5de

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

test/fiber/scheduler.rb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -340,15 +340,15 @@ def address_resolve(hostname)
340340
end.value
341341
end
342342

343-
# def blocking_operation_wait(work)
344-
# thread = Thread.new(&work)
343+
def blocking_operation_wait(work)
344+
thread = Thread.new(&work)
345345

346-
# thread.join
346+
thread.join
347347

348-
# thread = nil
349-
# ensure
350-
# thread&.kill
351-
# end
348+
thread = nil
349+
ensure
350+
thread&.kill
351+
end
352352
end
353353

354354
# This scheduler class implements `io_read` and `io_write` hooks which require

0 commit comments

Comments
 (0)