Callback serialEvent() is already invoked by Serial’s thread:
Processing.org/reference/libraries/serial/serialEvent_.html
So it can act as a “producer” thread like in this example:
Callback serialEvent() is already invoked by Serial’s thread:
Processing.org/reference/libraries/serial/serialEvent_.html
So it can act as a “producer” thread like in this example: