History

Merge pull request #13492 from SimonWalton-HiFi/script-engine-thread

ScriptsModel instances should be created & destroyed on the same thread (for ESS)

Clément Brisset committed 8 years ago

Commit ee036702 parents e3c6402 7270ab91 file · +3 −3Browse files

Showing the changes to assignment-client/src/scripts/EntityScriptServer.cpp (1 of 1 file). Show all

Unified · Split

assignment-client/src/scripts/EntityScriptServer.cpp+3−3
@@ -69,9 +69,6 @@ EntityScriptServer::EntityScriptServer(ReceivedMessage& message) : ThreadedAssig · 68 unmodified lines
6969 DependencyManager::set<AudioInjectorManager>();
7070
7171 DependencyManager::set<ScriptCache>();
72− DependencyManager::set<ScriptEngines>(ScriptEngine::ENTITY_SERVER_SCRIPT);
73−
74− DependencyManager::set<EntityScriptServerServices>();
7572
7673
7774 // Needed to ensure the creation of the DebugDraw instance on the main thread
@@ -254,6 +251,9 @@ void EntityScriptServer::handleEntityScriptCallMethodPacket(QSharedPointer<Recei · 176 unmodified lines
254251
255252
256253 void EntityScriptServer::run() {
254+ DependencyManager::set<ScriptEngines>(ScriptEngine::ENTITY_SERVER_SCRIPT);
255+ DependencyManager::set<EntityScriptServerServices>();
256+
257257 // make sure we request our script once the agent connects to the domain
258258 auto nodeList = DependencyManager::get<NodeList>();
259259