Source Code: Multithreading in Processing

Multithreading a piece of software, is useful in processing when you reach the limits of computing within the draw loop. Examples of this could be doing some sort of image analysis from a webcam while also drawing a user interface. When I first started using processing, it took me a while to figure out the architecture for multithreading. So, if anyone's interested, you can see an example below: