Watcher

class photonforge.pda.Watcher(task, loop)[source]

A running watch. Call cancel() when you are done with it.

A watch that stops because its callback raised is not silent: error holds the exception and the repr says so.

Methods

cancel()

Stop watching.

Attributes

error

Why the watch stopped, if the callback raised.

task

The underlying task, which lives on the client's event loop.

cancel()[source]

Stop watching. Safe to call from the thread that started it.

Return type:

None

property error: BaseException | None

Why the watch stopped, if the callback raised. None otherwise.

property task

The underlying task, which lives on the client’s event loop.