Javascript Workers - why is the worker message treated so lately and can I do something against it?
问题 I have a Worker that shares a SharedArrayBuffer with the "main thread". To work correctly, I have to make sure that the worker has access to the SAB before the main thread accesses to it. (EDIT: The code creating the worker has to be in a seperate function (EDIT2: which returns an array pointing to the SAB).) (Maybe, already this is not possible, you'll tell me). The initial code looks like this: function init() { var code = `onmessage = function(event) { console.log('starting'); var buffer