Skip to content

Commit 7943f4d

Browse files
committed
avoid blocking shutdown to see if that's what hangs
1 parent e60d7ee commit 7943f4d

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

src/hxcoro/CoroRun.hx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ class CoroRun {
141141
}
142142
}
143143

144-
pool.shutdown(true);
144+
pool.shutdown(false);
145145

146146
switch (scope.getError()) {
147147
case null:

src/hxcoro/thread/FixedThreadPool.hx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,6 @@ class FixedThreadPool implements IThreadPool {
6060
final queue:DispatchQueue;
6161
final thread:Thread;
6262

63-
final shutdownCounter = new AtomicInt(0);
64-
6563
/**
6664
Create a new thread pool with `threadsCount` threads.
6765
**/
@@ -108,9 +106,6 @@ class FixedThreadPool implements IThreadPool {
108106
public function shutdown(block:Bool = false):Void {
109107
if(_isShutdown) return;
110108
_isShutdown = true;
111-
if (block) {
112-
shutdownCounter.store(pool.length);
113-
}
114109

115110
function unlock() {
116111

0 commit comments

Comments
 (0)