How do message interrupts work under the hood?

So on_message will run to completion before the other on_message responds to the message?

Yes, only one function will be called at a time, on the Lua thread.

Also, what happens when multiple collisions happen simultaneously?

They’re not “simultaneous”, but just registered in some order from the physics engine.
The events reported, are sent to the message listener, one after another.

2 Likes