C++ wrapper for Python asyncio.Handle
class.
More...
#include <PyEventLoop.hh>
◆ id_t
◆ AsyncHandle() [1/3]
PyEventLoop::AsyncHandle::AsyncHandle |
( |
PyObject * |
handle | ) |
|
|
explicit |
◆ AsyncHandle() [2/3]
◆ AsyncHandle() [3/3]
PyEventLoop::AsyncHandle::AsyncHandle |
( |
AsyncHandle && |
old | ) |
|
◆ ~AsyncHandle()
PyEventLoop::AsyncHandle::~AsyncHandle |
( |
| ) |
|
◆ _finishedOrCancelled()
bool PyEventLoop::AsyncHandle::_finishedOrCancelled |
( |
| ) |
|
- Returns
- true if the job function has already been executed or cancelled.
◆ addRef()
void PyEventLoop::AsyncHandle::addRef |
( |
| ) |
|
Ref the timer so that the event-loop won't exit as long as the timer is active.
◆ cancel()
void PyEventLoop::AsyncHandle::cancel |
( |
| ) |
|
Cancel the scheduled event-loop job. If the job has already been canceled or executed, this method has no effect.
◆ cancelAll()
bool PyEventLoop::AsyncHandle::cancelAll |
( |
| ) |
|
|
static |
Cancel all pending event-loop jobs.
- Returns
- success
◆ cancelled()
bool PyEventLoop::AsyncHandle::cancelled |
( |
| ) |
|
- Returns
- true if the job has been cancelled.
◆ fromId()
◆ getAllTimers()
static auto & PyEventLoop::AsyncHandle::getAllTimers |
( |
| ) |
|
|
static |
◆ getDebugInfo()
PyObject * PyEventLoop::AsyncHandle::getDebugInfo |
( |
| ) |
|
◆ getHandleObject()
PyObject * PyEventLoop::AsyncHandle::getHandleObject |
( |
| ) |
const |
Get the underlying asyncio.Handle
Python object.
◆ getUniqueId()
◆ hasRef()
bool PyEventLoop::AsyncHandle::hasRef |
( |
| ) |
|
Getter for if the timer has been ref'ed.
◆ newEmpty()
static id_t PyEventLoop::AsyncHandle::newEmpty |
( |
| ) |
|
|
static |
Create a new AsyncHandle
without an associated asyncio.Handle
Python object.
- Returns
- the timeoutId
◆ removeRef()
void PyEventLoop::AsyncHandle::removeRef |
( |
| ) |
|
Unref the timer so that the event-loop can exit.
◆ setDebugInfo()
void PyEventLoop::AsyncHandle::setDebugInfo |
( |
PyObject * |
obj | ) |
|
Set the debug info object for WTFPythonMonkey tool.
◆ swap()
PyObject * PyEventLoop::AsyncHandle::swap |
( |
PyObject * |
newHandleObject | ) |
|
Replace the underlying asyncio.Handle
Python object with the provided value.
- Returns
- the old
asyncio.Handle
object
◆ _debugInfo
PyObject* PyEventLoop::AsyncHandle::_debugInfo = nullptr |
|
protected |
◆ _handle
PyObject* PyEventLoop::AsyncHandle::_handle |
|
protected |
◆ _refed
std::atomic_bool PyEventLoop::AsyncHandle::_refed = false |
|
protected |
The documentation for this struct was generated from the following files: