News for hackers. Stuff that matters.
Re:State of Loom by uryga on Saturday May 16, 2020 @10:03PM (#23208843)
afaik sync can call async if the language allows you to make an executor/event-loop. e.g. with python's asyncio it'd be something like

  def sync_foo():
    task = async_bar()
    loop = asyncio.new_event_loop()
    return loop.run_until_complete(task)
after all, unless the loop is built into the language (like JS), you need bootstrap the async code somehow

There are no comments on this comment yet.