Handle — Handle base class

class pyuv.Handle

Handle is an internal base class from which all handles inherit in pyuv. It provides all handles with a number of methods which are common for all.

close([callback])
Parameters:callback (callable) – Function that will be called after the handle is closed.

Close the handle. After a handle has been closed no other operations can be performed on it, they will raise HandleClosedError.

Callback signature: callback(handle)

ref

Reference/unreference this handle. If running the event loop in default mode (UV_RUN_DEFAULT) the loop will exit when there are no more ref’d active handles left. Setting ref to True on a handle will ensure that the loop is maintained alive while the handle is active. Likewise, if all handles are unref’d, the loop would finish enven if they were all active.

loop

Read only

Loop object where this handle runs.

active

Read only

Indicates if this handle is active.

closed

Read only

Indicates if this handle is closing or already closed.