GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — test: wait for shared-isolate Worker exit · nodejs/node@9c2b2ad

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • test/cctest
    • test_environment_shared_isolate.cc
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎test/cctest/test_environment_shared_isolate.cc‎

Copy file name to clipboardExpand all lines: test/cctest/test_environment_shared_isolate.cc
+5-1Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,9 +354,13 @@ TEST_P(SharedIsolateTest, EnvironmentsComeAndGoWhileSiblingsRun) {
354354
" return 0;\n"
355355
"})()"),
356356
0);
357-
for (int turn = 0; turn < 10000; turn++) {
357+
// Loop turns do not bound Worker startup time. Yield to the Worker and
358+
// allow it to finish even when the main thread pumps the loop quickly.
359+
const uint64_t deadline = uv_hrtime() + 30ULL * 1000 * 1000 * 1000;
360+
while (uv_hrtime() < deadline) {
358361
PumpLoop(1);
359362
if (EvaluateInt(third.get(), "state.workerExit") == 7) break;
363+
uv_sleep(1);
360364
}
361365
EXPECT_EQ(EvaluateInt(third.get(), "state.workerExit"), 7);
362366
}

0 commit comments

Comments
0 (0)
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.