Allegro.cc - Online Community

Allegro.cc Forums » Programming Questions » al_emit_user_event() thread safe?

Credits go to Edgar Reynaldo and Vanneto for helping out!
This thread is locked; no one can reply to it. rss feed Print
al_emit_user_event() thread safe?
Mark Oates
Member #1,146
March 2001
avatar

I want to call al_emit_user_event() from a separate thread on an event queue that is being used elsewhere in the program. Is that ok? Do I need to mutex lock all instances :-/ of the event_queue to prevent problems?

Edgar Reynaldo
Member #8,592
May 2007
avatar

Vanneto
Member #8,643
May 2007

al_emit_user_event() calls _al_event_source_lock before emitting the event, implemented here. So basically, what Edgar said.

In capitalist America bank robs you.

Mark Oates
Member #1,146
March 2001
avatar

Awesome, thanks guys :)

Go to: