mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Add panics just in case.
This commit is contained in:
@@ -74,8 +74,8 @@ fn void? FixedThreadPool.join(&self) @maydiscard // Remove optional in 0.8.0
|
|||||||
self.joining = true;
|
self.joining = true;
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
self.notify.broadcast();
|
self.notify.broadcast()!!;
|
||||||
self.collect.wait(&self.mu);
|
self.collect.wait(&self.mu)!!;
|
||||||
} while (self.qindex != 0 || self.qworking != 0);
|
} while (self.qindex != 0 || self.qworking != 0);
|
||||||
self.joining = false;
|
self.joining = false;
|
||||||
}
|
}
|
||||||
@@ -171,7 +171,7 @@ fn int process_work(void* self_arg) @private
|
|||||||
// Wait for work.
|
// Wait for work.
|
||||||
while (self.qindex == 0)
|
while (self.qindex == 0)
|
||||||
{
|
{
|
||||||
if (self.joining && self.qworking == 0) self.collect.signal();
|
if (self.joining && self.qworking == 0) self.collect.signal()!!;
|
||||||
if (self.stop)
|
if (self.stop)
|
||||||
{
|
{
|
||||||
// Shutdown requested.
|
// Shutdown requested.
|
||||||
@@ -179,7 +179,7 @@ fn int process_work(void* self_arg) @private
|
|||||||
self.mu.unlock();
|
self.mu.unlock();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
self.notify.wait(&self.mu);
|
self.notify.wait(&self.mu)!!;
|
||||||
if (self.stop_now)
|
if (self.stop_now)
|
||||||
{
|
{
|
||||||
// Shutdown requested.
|
// Shutdown requested.
|
||||||
|
|||||||
Reference in New Issue
Block a user