Switch to <* *> docs. Fix issue with dynamically loaded C3 libs with other C3 code.

This commit is contained in:
Christoffer Lerno
2024-10-12 17:55:05 +02:00
committed by Christoffer Lerno
parent 9f6a4eb300
commit 31cd839063
119 changed files with 3271 additions and 3277 deletions

View File

@@ -23,9 +23,9 @@ struct QueueItem @private
void* arg;
}
/**
* @require !self.initialized "ThreadPool must not be already initialized"
**/
<*
@require !self.initialized "ThreadPool must not be already initialized"
*>
fn void! ThreadPool.init(&self)
{
defer catch @ok(self.destroy());
@@ -40,19 +40,19 @@ fn void! ThreadPool.init(&self)
}
}
/*
* Stop all the threads and cleanup the pool.
* Any pending work will be dropped.
*/
<*
Stop all the threads and cleanup the pool.
Any pending work will be dropped.
*>
fn void! ThreadPool.destroy(&self)
{
return self.@shutdown(stop_now);
}
/*
* Stop all the threads and cleanup the pool.
* Any pending work will be processed.
*/
<*
Stop all the threads and cleanup the pool.
Any pending work will be processed.
*>
fn void! ThreadPool.stop_and_destroy(&self)
{
return self.@shutdown(stop);
@@ -82,10 +82,10 @@ macro void! ThreadPool.@shutdown(&self, #stop) @private
}
}
/*
* Push a new job to the pool.
* Returns whether the queue is full, in which case the job is ignored.
*/
<*
Push a new job to the pool.
Returns whether the queue is full, in which case the job is ignored.
*>
fn void! ThreadPool.push(&self, ThreadFn func, void* arg)
{
while (true)