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
69 DependencyManager::set<AudioInjectorManager>();69 DependencyManager::set<AudioInjectorManager>();
70 70
71 DependencyManager::set<ScriptCache>();71 DependencyManager::set<ScriptCache>();
72 DependencyManager::set<ScriptEngines>(ScriptEngine::ENTITY_SERVER_SCRIPT);
73
74 DependencyManager::set<EntityScriptServerServices>();
75 72
76 73
77 // Needed to ensure the creation of the DebugDraw instance on the main thread74 // 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
254 251
255 252
256void EntityScriptServer::run() {253void EntityScriptServer::run() {
254 DependencyManager::set<ScriptEngines>(ScriptEngine::ENTITY_SERVER_SCRIPT);
255 DependencyManager::set<EntityScriptServerServices>();
256
257 // make sure we request our script once the agent connects to the domain257 // make sure we request our script once the agent connects to the domain
258 auto nodeList = DependencyManager::get<NodeList>();258 auto nodeList = DependencyManager::get<NodeList>();
259 259