Hi, just wondering if anyone can shed light on how the JS engine in MAX copes with multiple threads of execution...
I believe (pls correct me if I'm wrong) that each m4l device runs in its own thread. I have a number of devices which use some shared functions and data stored in a js Global. When each device initialises it calls functions in here and grabs data (and maybe sets some to). In a normal multithreaded env this would all be need to be synced, but as far as I'm aware this is not possible in JS.
I guess what I need to know is whether the JS engine in MAX runs in its own single thread and the calls from other threads are all synced into this. My devices work fine when I only have one of them at a time, but as soon as I have multiple I get crashes in max/live.
If anyone has any detail on this, would be greatly appreciated. thx