Wireshark 4.7.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
Signals | Protected Member Functions | Protected Attributes | Friends | List of all members
GLibPoller Class Reference

A background thread that polls a GLib main context. More...

#include <glib_mainloop_on_qeventloop.h>

Inheritance diagram for GLibPoller:

Signals

void polled (void)
 Signal emitted when the polling operation detects activity.
 

Protected Member Functions

 GLibPoller (GMainContext *context)
 Constructs a new GLibPoller.
 
 ~GLibPoller ()
 Destroys the GLibPoller.
 
void run () override
 Executes the polling loop in the background thread.
 

Protected Attributes

QMutex mutex_
 
QWaitCondition dispatched_
 
GMainContext * ctx_
 
int priority_
 
GPollFD * fds_
 
int allocated_fds_
 
int nfds_
 

Friends

class GLibMainloopOnQEventLoop
 Friend class allowing access to private members.
 

Detailed Description

A background thread that polls a GLib main context.

Constructor & Destructor Documentation

◆ GLibPoller()

GLibPoller::GLibPoller ( GMainContext *  context)
explicitprotected

Constructs a new GLibPoller.

Parameters
contextThe GLib main context to poll.

Member Data Documentation

◆ allocated_fds_

int GLibPoller::allocated_fds_
protected

The number of allocated file descriptors in the array.

◆ ctx_

GMainContext* GLibPoller::ctx_
protected

The GLib main context being polled.

◆ dispatched_

QWaitCondition GLibPoller::dispatched_
protected

Condition variable to signal when events are dispatched.

◆ fds_

GPollFD* GLibPoller::fds_
protected

Array of file descriptors being polled.

◆ mutex_

QMutex GLibPoller::mutex_
protected

Mutex for thread synchronization.

◆ nfds_

int GLibPoller::nfds_
protected

The number of active file descriptors being polled.

◆ priority_

int GLibPoller::priority_
protected

The maximum priority of the events to be dispatched.


The documentation for this class was generated from the following files: