You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Significant progress on this has already been made, but I figured it would be good to have some kind of tracking issue since it's a big change.
The connmgr component uses async tasks, driven by the Executor and Reactor Rust types, whereas the proxy and handler components use callbacks driven by the Qt event loop (QEventLoop / QCoreApplication). Ideally, we could consolidate on the same Rust-based evented subsystem for all three components. In other words, the proxy and handler ought to be able to use Reactor (and perhaps more) in place of the Qt event loop.
Benefits of this change:
The proxy and handler get a more performant evented subsystem.
Consistent behavior across all components. Don't have two subsystems to debug.
Opens the door to potentially being able to run evented Rust code and evented C++ code in the same thread.
In order to move off of the Qt event loop to something else, we need substitutes for all things we are using that depend on it. These are:
QTimer
QSocketNotifier
QTcpSocket & QTcpServer
QMetaObject::invokeMethod with Qt::QueuedConnection
QObject::deleteLater
We also need some kind of event loop substitute that allows registering callbacks for socket/timer activity, similar to QAbstractEventDispatcher but built on top of Reactor.
Tasks:
- Make a substitute event loop class on top of Reactor, allowing callback registrations for file descriptors and timers.
- Make our own socket notifier class that works with the new event loop.
- Make our own timer class that works with the new event loop.
- Make a mechanism for deferred calls (including deferred deletes), based on our own timers.
- Make it possible to queue calls across threads.
- Make our own TCP socket/listener classes, based on our own socket notifiers.
- Use our alternatives everywhere in the handler. Listing this component first since it's single threaded and therefore a little easier.
- Use our alternatives everywhere in the proxy.
The text was updated successfully, but these errors were encountered:
jkarneges
changed the title
Use Rust-based event loop instead of Qt event loop
Use Rust-based event loop instead of Qt event loop in proxy/handler
Feb 27, 2025
Significant progress on this has already been made, but I figured it would be good to have some kind of tracking issue since it's a big change.
The connmgr component uses async tasks, driven by the
Executor
andReactor
Rust types, whereas the proxy and handler components use callbacks driven by the Qt event loop (QEventLoop
/QCoreApplication
). Ideally, we could consolidate on the same Rust-based evented subsystem for all three components. In other words, the proxy and handler ought to be able to useReactor
(and perhaps more) in place of the Qt event loop.Benefits of this change:
In order to move off of the Qt event loop to something else, we need substitutes for all things we are using that depend on it. These are:
QTimer
QSocketNotifier
QTcpSocket
&QTcpServer
QMetaObject::invokeMethod
withQt::QueuedConnection
QObject::deleteLater
We also need some kind of event loop substitute that allows registering callbacks for socket/timer activity, similar to
QAbstractEventDispatcher
but built on top ofReactor
.Tasks:
Reactor
, allowing callback registrations for file descriptors and timers.The text was updated successfully, but these errors were encountered: