comparison Platforms/Wasm/WasmDelayedCallExecutor.js @ 431:26b90b110719 am-vsol-upgrade

added DelayedCallExecutor to avoid using sleep() in C++ that consumes 100% CPU once executed in WASM
author am@osimis.io
date Thu, 29 Nov 2018 19:25:15 +0100
parents
children 5055031f4a06
comparison
equal deleted inserted replaced
430:b85f635f1eb5 431:26b90b110719
1 mergeInto(LibraryManager.library, {
2 WasmDelayedCallExecutor_Schedule: function(callable, timeoutInMs/*, payload*/) {
3 setTimeout(function() {
4 WasmDelayedCallExecutor_ExecuteCallback(callable/*, payload*/);
5 }, timeoutInMs);
6 }
7 });