Gateway Operation - Multitasking?


#1

I have a Gateway with 3 Bluz DK running something similar to the sample code. After the Photon receives a message from the Bluz unit, some processing of that message occurs.

What happens to the Gateway code execution if the Photon receives messages simultaneously from more than one Bluz?

Will the Photon code process each message in sequence (buffer messages) or will this be a form of multitasking where variables may change before the first message is processed …?

My question is similar to interrupt-driven programming where two interrupts may occur relatively close to one another and before the first interrupt is fully dealt with. In my case, I used to place the messages in a queue and make sure only one message is processed at a time …


#2

Messages are processed in a serial fashion through buffers. So the gateway code just looks for new data on the buffer, processes it, and moves on.