Closed kateinoigakukun closed 2 months ago
Time Change: +234ms (2%)
Total Time: 9,543ms
Test name | Duration | Change | |
---|---|---|---|
Serialization/JavaScript function call through Wasm import | 22ms | +2ms (7%) | 🔍 |
Serialization/JavaScript function call from Swift | 101ms | +5ms (5%) | 🔍 |
Serialization/JavaScript Number to Swift Int | 313ms | +17ms (5%) | 🔍 |
This change makes
JavaScriptEventLoop
to be allocated per thread in multi-threaded environment. This is necessary to ensure that a job enqueued in one thread is executed in the same thread because JSObject managed by a worker can only be accessed in the same thread.Currently,
swift_task_enqueueMainExecutor_hook
continues enqueuing jobs to the current thread event loop. It should eventually enqueue to the main thread event loop even if it's enqueued from worker threads.