module Kernel

def Async(*arguments, **options, &block)

Run the given block of code in a task, asynchronously, creating a reactor if necessary.
def Async(*arguments, **options, &block)
	::Async::Reactor.run(*arguments, **options, &block)
end

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
	else
		::Async::Reactor.run(&block).wait
	end
end