Async — Async handle

class pyuv.Async(loop, callback)
  • loop (Loop) – loop object where this handle runs (accessible through Async.loop).
  • callback (callable) – Function that will be called after the Async handle fires. It will be called in the event loop.

Calling event loop related functions from an outside thread is not safe in general. This is actually the only handle which is thread safe. The Async handle may be used to pass control from an outside thread to the event loop, as it will allow the calling thread to schedule a callback which will be called in the event loop thread.


Start the Async handle. The callback will be called at least once.

Callback signature: callback(async_handle)

Previous topic

Process — Child process spawning handle

Next topic

Prepare — Prepare handle

This Page