Hi everybody,
I just wanted to know if there is a way to dispatch an event from a given thread, and then catch the event in the Application, in another thread. There is a similar feature in Qt framework (with signals/slots).
I made a basic test with bind, which shows the current thread when code is running, and given the results, I assume the event callback is called from the dispatcher thread, which is not what I want.
Anyway, is it ok to dispatch events from another thread? Can it cause errors? If no, I can create a thread safe queue to synchronize the 2 threads (pushing the event in the callback into the queue, and poping from the queue in main thread).
I think it would be very usefull having a way to retrieve events in main thread, whatever the dispatcher thread.
Thanks!