al_emit_user_event() thread safe?
Mark Oates

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

I may be wrong, but I think the event queues are thread safe. I think they have internal locking mechanisms.

Vanneto

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

Mark Oates

Awesome, thanks guys :)

Thread #615881. Printed from Allegro.cc