Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Synchronize input event processing #4998
Some renderers (OpenGL) fire events on background threads, which can corrupt the event queue when the sketch is not looping and multiple threads add and remove from the queue at the same time.
This PR uses blocking queue to serialize enqueuing and lock to synchronize dequeuing.
In the ideal case, we should be able to invoke code on the animation thread (ala invokeLater) and always dequeue events from there even when the sketch is not looping.