3 ms·
Javascript's single thread is an event loop. If the code is written correctly, it should not be holding anything else up to do I/O. That can be dispatched to ru
by ziml77 3y ago
Javascript's single thread is an event loop. If the code is written correctly, it should not be holding anything else up to do I/O. That can be dispatched to run asynchronously, and when the data is ready the event loop will call back into the code that was waiting for the response. Also, modern JS engines do support spawning threads. But even if they didn't natively, the Thunderbird devs could have exposed APIs to JS code that allow it.