It would be good to be able to tag callbacks as invocable from any thread, and have multiple worker threads running callbacks. If this goes far enough, we could even go to a situation with dispatch functions running independently in multiple threads. See Nick Black's libtorque work for some good ideas on that last point.
View and moderate all "feature-requests Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Feature Requests"
Is this problem can be solved used next concept?:
event_base_loop() {
lock(mutex);
while (...) {
dispatch(base);
c = get_callback(ev);
unlock(mutex);
do_callback( c );
lock(mutex);
}
unlock(mutex);
}
Mutex guarantee that dispatch be called by one thread, but functions callback can work in multiple threads.
I can wrote this patch.
Last edit: Anonymous 2014-10-13