# Which Thread For Handling OpenGL's Window?

**URL:** <https://discourse.glfw.org/t/which-thread-for-handling-opengls-window/871>\
**Category:** support\
**Created:** [March 6, 2017, 1:52am UTC](https://discourse.glfw.org/t/which-thread-for-handling-opengls-window/871 "2017-03-06T01:52:30Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![mmozeiko](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.glfw.org/mmozeiko/32/29_2.png) [@mmozeiko](https://discourse.glfw.org/u/mmozeiko)\
**Post date:** [March 6, 2017, 2:09am UTC](https://discourse.glfw.org/t/which-thread-for-handling-opengls-window/871/2 "2017-03-06T02:09:43Z")

</div>

See glfw documentation on thread safety: [http://www.glfw.org/docs/latest/intro.html#thread\_safety](http://www.glfw.org/docs/latest/intro.html#thread_safety)

Basically you can render from any thread, but window event processing must happen on main thread due to limitations of some of platforms. On some platforms it will work fine if you consume events on non-main thread, but on some platforms it won’t work at all. So if your use case of glfw is to maintain cross-platform compatibility, process window events only on main thread.

---

_[View the full topic](https://discourse.glfw.org/t/which-thread-for-handling-opengls-window/871)._
