module Kernel

def Sync(&block)

Run the given block of code synchronously, but within a reactor if not already in one.
def Sync(&block)
	if task = ::Async::Task.current?
		yield task
	else
		::Async::Reactor.run(&block).wait
	end
end