lib/kernel/sync.rb in async-2.2.1 vs lib/kernel/sync.rb in async-2.3.0

- old
+ new

@@ -17,9 +17,10 @@ # @asynchronous Will block until given block completes executing. def Sync(&block) if task = ::Async::Task.current? yield task else + # This calls Fiber.set_scheduler(self): reactor = Async::Reactor.new begin return reactor.run(finished: ::Async::Condition.new, &block).wait ensure