Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The getAssetAsynchronous method uses a thread pool so that requests to load assets don't block networking threads etc. It has been a single thread pool through the existing git history but it is assumed that it is like this because it used to have a thread and then was converted to use a single thread fixed thread pool. Unfortunately having a single thread only means that if an asset load callback indirectly loads another asset then this can deadlock since the asset loader thread needs to be released before the load request can start, which it can't because that thread is waiting for the result of loading the new asset, thus it deadlocks if an AddOn includes a JavaScript onInit script since it deadlocks waiting to load that script. Changing the thread pool so that the threads load in parallel is an observable change that could cause problems, but if the AddOn isn't already loaded the addonLoader's thread pool loads it instead and that works fine, so MapTool should be alright with addons and other assets loading in parallel.
- Loading branch information