mirror of
https://github.com/trailbaseio/trailbase.git
synced 2026-01-06 01:40:12 -06:00
Implemented a custom JS event loop and use call_function_immediate with custom completers to allow interleaving multiple requests into the same isolate.
This avoids idle while JS is doing I/O and avoid corner-case of livelock when running out of free workers while TB calls itself.
This commit is contained in:
@@ -20,7 +20,7 @@ async function initTrailBase(): Promise<{ subprocess: Subprocess }> {
|
||||
throw Error("cargo build failed");
|
||||
}
|
||||
|
||||
const subprocess = execa`cargo run -- --data-dir ../testfixture run -a 127.0.0.1:${port} --js-runtime-threads 2`;
|
||||
const subprocess = execa`cargo run -- --data-dir ../testfixture run -a 127.0.0.1:${port} --js-runtime-threads 1`;
|
||||
|
||||
for (let i = 0; i < 100; ++i) {
|
||||
if ((subprocess.exitCode ?? 0) > 0) {
|
||||
|
||||
Reference in New Issue
Block a user