Hi Michael,
I was thinking that factory.waitForAsyncUpdate() causes the factory to be processed remotely, but now I'm thinking that it does exactly what the name implies: waits for some event that occurs when an already-running remote process finishes.
It sounds like there are "async factories" that are processed remotely by default when doing factory.update(), like ArrayGem and Twist, and that it's necessary to do factory.waitForAsyncUpdate() after doing factory.update() and before using the results from the update of an async factory.
But, if an async factory is run with factory.calculate() then it will run on the main process rather than remotely.
However, any factory, including async factories, can be processed remotely by doing factory.calculate( 'async' ) and in that case factory.waitForAsyncUpdate() shouldn't be used as the next line in JavaScript, because factory.calculate( 'async' ) is already waiting internally for the remote process to finish.
- Peer
|