# Posting to the event queue from another thread?

**URL:** <https://discourse.glfw.org/t/posting-to-the-event-queue-from-another-thread/549>\
**Category:** support\
**Created:** [April 16, 2013, 8:14am UTC](https://discourse.glfw.org/t/posting-to-the-event-queue-from-another-thread/549 "2013-04-16T08:14:32Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex035/uploads/glfw/original/1X/b8cdefe6b61b8d5aee6c43b2c56e9cf5eabecfe4.svg) [@system](https://discourse.glfw.org/u/system)\
**Post date:** [April 16, 2013, 8:14am UTC](https://discourse.glfw.org/t/posting-to-the-event-queue-from-another-thread/549/1 "2013-04-16T08:14:32Z")

</div>

**[weeboe](https://sourceforge.net/u/weeboe/)** wrote on [Tuesday, April 16, 2013](https://sourceforge.net/p/glfw/discussion/247562/thread/d593ef4d/#2c16):

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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex035/uploads/glfw/original/1X/b8cdefe6b61b8d5aee6c43b2c56e9cf5eabecfe4.svg) [@system](https://discourse.glfw.org/u/system)\
**Post date:** [April 25, 2013, 4:17pm UTC](https://discourse.glfw.org/t/posting-to-the-event-queue-from-another-thread/549/2 "2013-04-25T16:17:56Z")

</div>

**[elmindreda](https://sourceforge.net/u/elmindreda/)** wrote on [Thursday, April 25, 2013](https://sourceforge.net/p/glfw/discussion/247562/thread/d593ef4d/#4ab9):

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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex035/uploads/glfw/original/1X/b8cdefe6b61b8d5aee6c43b2c56e9cf5eabecfe4.svg) [@system](https://discourse.glfw.org/u/system)\
**Post date:** [May 23, 2013, 11:23pm UTC](https://discourse.glfw.org/t/posting-to-the-event-queue-from-another-thread/549/3 "2013-05-23T23:23:08Z")

</div>

**[jzxu](https://sourceforge.net/u/jzxu/)** wrote on [Thursday, May 23, 2013](https://sourceforge.net/p/glfw/discussion/247562/thread/d593ef4d/#4f57):

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?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex035/uploads/glfw/original/1X/b8cdefe6b61b8d5aee6c43b2c56e9cf5eabecfe4.svg) [@system](https://discourse.glfw.org/u/system)\
**Post date:** [June 24, 2013, 12:09pm UTC](https://discourse.glfw.org/t/posting-to-the-event-queue-from-another-thread/549/4 "2013-06-24T12:09:46Z")

</div>

**[orbiten](https://sourceforge.net/u/orbiten/)** wrote on [Monday, June 24, 2013](https://sourceforge.net/p/glfw/discussion/247562/thread/d593ef4d/#4ab9/19a0):

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 ☹

---

<div class="post-metadata">

**Author:** ![dougbinks](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.glfw.org/dougbinks/32/39_2.png) [@dougbinks](https://discourse.glfw.org/u/dougbinks)\
**Post date:** [November 16, 2026, 4:18pm UTC](https://discourse.glfw.org/t/posting-to-the-event-queue-from-another-thread/549/5 "2026-11-16T16:18:36Z")

</div>

Closed on November 16, 2026, 4:18pm UTC


