Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/hxcoro/run/Setup.hx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class Setup {
function finalize() {
scheduler.shutDown();
shutDownDispatcher(dispatcher);
cpp.luv.Luv.stopLoop(loop);
cpp.luv.Luv.shutdownLoop(loop);
Comment thread
Simn marked this conversation as resolved.
Resolved
cpp.luv.Luv.freeLoop(loop);
}
return new LoopSetup(scheduler, dispatcher, finalize);
Expand Down Expand Up @@ -122,7 +122,7 @@ class Setup {
#if interp
return createLuv();
#elseif (cpp && hxcpp_luv_io)
return createLuvThreadPool();
return createLuv();
#elseif (jvm || cpp || hl)
return createThreadPool(10);
#else
Expand Down
8 changes: 7 additions & 1 deletion tests/src/Main.hx
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@ function main() {
runner.addCases("schedulers");
runner.addCases("structured");

utest.ui.Report.create(runner, NeverShowSuccessResults, AlwaysShowHeader);
final reporter = utest.ui.Report.create(runner, NeverShowSuccessResults, AlwaysShowHeader);
#if (cpp && hxcpp_luv_io)
reporter.setHandler(_ -> {
cpp.luv.Luv.shutdown();
});
#end

runner.run();
}
2 changes: 1 addition & 1 deletion tests/src/run/TestEntrypoints.hx
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ class TestEntrypoints extends utest.Test {
final setup = Setup.createLuvGen(
(uvLoop, loop) -> new ThreadPoolDispatcher(loop, pool),
dispatcher -> {
pool.shutDown();
pool.shutDown(true);
}
);
final context = setup.createContext();
Expand Down
Loading