qb  2.0.0.0
C++17 Actor Framework
qb Issue Watch Star Fork Follow @isndev
Loading...
Searching...
No Matches
listener.h File Reference

Core event loop manager for the asynchronous IO framework. More...

#include <algorithm>
#include <qb/system/container/unordered_set.h>
#include <qb/utility/branch_hints.h>
#include <qb/utility/type_traits.h>
#include <thread>
#include <vector>
#include "event/base.h"
Include dependency graph for listener.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  qb::io::async::listener
 Central event loop manager for asynchronous IO operations. More...
class  qb::io::async::listener::RegisteredKernelEvent< _Event, _Actor >
 Template wrapper for concrete event handlers and their associated libev watchers. More...

Functions

void qb::io::async::init ()
 Initialize the asynchronous event system for the current thread.
std::size_t qb::io::async::run (int flag=0)
 Run the event loop for the current thread.
std::size_t qb::io::async::run_once ()
 Run the event loop once for the current thread, waiting for at least one event.
std::size_t qb::io::async::run_until (bool const &status)
 Run the event loop for the current thread until a condition is met.
void qb::io::async::break_parent ()
 Request the parent (current thread's) event loop to break.

Detailed Description

Core event loop manager for the asynchronous IO framework.

This file defines the listener class which serves as the central event loop manager for the asynchronous IO framework. It provides thread-local access to the event loop, registration and management of event handlers, and methods to run the event loop.

Author
qb - C++ Actor Framework

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.