PythonMonkey   v1.0.0 (dev)
Loading...
Searching...
No Matches
PyEventLoop::Lock Struct Reference

#include <PyEventLoop.hh>

Public Member Functions

 Lock ()
 
 ~Lock ()
 
void incCounter ()
 Increment the counter for the number of our job functions in the Python event-loop.
 
void decCounter ()
 Decrement the counter for the number of our job functions in the Python event-loop.
 

Public Attributes

PyObject * _queueIsEmpty = nullptr
 An asyncio.Event instance to notify that there are no queued asynchronous jobs.
 

Protected Attributes

std::atomic_int _counter = 0
 

Constructor & Destructor Documentation

◆ Lock()

PyEventLoop::Lock::Lock ( )
explicit

◆ ~Lock()

PyEventLoop::Lock::~Lock ( )

Member Function Documentation

◆ decCounter()

void PyEventLoop::Lock::decCounter ( )

Decrement the counter for the number of our job functions in the Python event-loop.

◆ incCounter()

void PyEventLoop::Lock::incCounter ( )

Increment the counter for the number of our job functions in the Python event-loop.

Member Data Documentation

◆ _counter

std::atomic_int PyEventLoop::Lock::_counter = 0
protected

◆ _queueIsEmpty

PyObject* PyEventLoop::Lock::_queueIsEmpty = nullptr

An asyncio.Event instance to notify that there are no queued asynchronous jobs.

See also
https://docs.python.org/3/library/asyncio-sync.html#asyncio.Event

The documentation for this struct was generated from the following file: