# Event callback reentrancy

**URL:** <https://discourse.glfw.org/t/event-callback-reentrancy/1609>\
**Category:** support\
**Created:** [July 16, 2020, 11:41pm UTC](https://discourse.glfw.org/t/event-callback-reentrancy/1609 "2020-07-16T23:41:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![poconn](https://avatars.discourse-cdn.com/v4/letter/p/90ced4/32.png) [@poconn](https://discourse.glfw.org/u/poconn)\
**Post date:** [July 16, 2020, 11:41pm UTC](https://discourse.glfw.org/t/event-callback-reentrancy/1609/1 "2020-07-16T23:41:09Z")

</div>

Hi all!

After registering an event handler with `glfwSet*Callback()`, is it possible for the callback (or different callbacks for different event types) to be called multiple times in parallel? I looked at the Win32 backend and seems like this won’t happen for that, but is this actually guaranteed for other platforms and any future ones?

Thanks!

---

<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:** [July 17, 2020, 8:54am UTC](https://discourse.glfw.org/t/event-callback-reentrancy/1609/2 "2020-07-17T08:54:54Z")

</div>

Hi @poconn welcome to the GLFW forum,

See the [documentation on thread safety](https://www.glfw.org/docs/latest/intro_guide.html#thread_safety):

_Because event processing must be performed on the main thread, all callbacks except for the error callback will only be called on that thread. The error callback may be called on any thread, as any GLFW function may generate errors._

Note that you will only get the error callback called on another thread if you call glfw functions from that thread.

Hopefully this answers your question.

Cheers,

Doug.

---

<div class="post-metadata">

**Author:** ![poconn](https://avatars.discourse-cdn.com/v4/letter/p/90ced4/32.png) [@poconn](https://discourse.glfw.org/u/poconn)\
**Post date:** [July 17, 2020, 9:52am UTC](https://discourse.glfw.org/t/event-callback-reentrancy/1609/3 "2020-07-17T09:52:57Z")

</div>

Yep, sorry I missed that, I was looking at the “input guide” page but should have checked the intro. Thanks a lot!
