franky fixes a bug on the workerthread where the promise would run out of scope before the end of the set value function which would produce a deadlock