Posting to the event queue from another thread?

weeboe wrote on Tuesday, April 16, 2013:

Hi,

Suppose you have audio playing on a separate thread, and you want to render an oscilloscope picture of the audio waveform via the main thread. The easiest way to accomplish this would be to insert a custom message into the event queue. This is not provided in GLFW however. Still it would be very useful, and probably easy to implement. (Actually this is the reason that I’m trying GLFW instead of GLUT). Please could one of the GLFW designers comment on this?

Wouter Boeke

elmindreda wrote on Thursday, April 25, 2013:

This would definitely be useful, and will possibly be added later in the 3.x line.

jzxu wrote on Thursday, May 23, 2013:

I’d like this functionality also. Would it be easy to hack something into the library while we wait for the 3.x line? If so, can you provide some pointers as to where to begin?

orbiten wrote on Monday, June 24, 2013:

If adding custom / user messages is complicated then at least having a thread safe way to wake up the render thread from a glfwWaitEvents() call would be great.

This way user could add a custom thread safe message queue for his messages. Currently i can find no way to accomplish this :frowning: