This fixes deadlock in Interface and in Assignment Client due to Recording API calls.
Earlier all Recording script API calls happened on main thread using BLOCKING_INVOKE_METHOD, which is fine for ones that don't do anything script engine-related, but will cause a deadlock when script value such as script callback is copied or accessed.
I added a recursive mutex to all calls to be sure that it's thread-safe.
I needed to restore some of the invoke calls - I didn't notice that some of them were calling Deck::processFrames() which needs to happen on main thread so Recording API stopped working after removing them.
This fixes deadlock in Interface and in Assignment Client due to Recording API calls. Earlier all Recording script API calls happened on main thread using BLOCKING_INVOKE_METHOD, which is fine for ones that don't do anything script engine-related, but will cause a deadlock when script value such as script callback is copied or accessed. I added a recursive mutex to all calls to be sure that it's thread-safe.