mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Change @return! syntax to require ":" after faults. Update all contracts to consistently use ":" before the description.
This commit is contained in:
@@ -171,7 +171,7 @@ fn void remove_all_pool_threads(EventThreadPool* pool) @local
|
||||
}
|
||||
|
||||
<*
|
||||
@require size > 0 "Must have at least one thread"
|
||||
@require size > 0 : "Must have at least one thread"
|
||||
*>
|
||||
fn EventThreadPool* EventThreadPool.init(&self, int size, String name, Allocator allocator, void* monitor_context)
|
||||
{
|
||||
|
||||
@@ -32,9 +32,9 @@ struct QueueItem @private
|
||||
}
|
||||
|
||||
<*
|
||||
@require !self.initialized "ThreadPool must not be already initialized"
|
||||
@require threads > 0 && threads < 0x1000 `Threads should be greater than 0 and less than 0x1000`
|
||||
@require queue_size < 0x10000 `Queue size must be less than 65536`
|
||||
@require !self.initialized : "ThreadPool must not be already initialized"
|
||||
@require threads > 0 && threads < 0x1000 : `Threads should be greater than 0 and less than 0x1000`
|
||||
@require queue_size < 0x10000 : `Queue size must be less than 65536`
|
||||
*>
|
||||
fn void! FixedThreadPool.init(&self, usz threads, usz queue_size = 0)
|
||||
{
|
||||
|
||||
@@ -89,7 +89,7 @@ fn void! NativeMutex.lock(&mtx)
|
||||
|
||||
|
||||
<*
|
||||
@require mtx.timed "Only available for timed locks"
|
||||
@require mtx.timed : "Only available for timed locks"
|
||||
*>
|
||||
fn void! NativeMutex.lock_timeout(&mtx, ulong ms)
|
||||
{
|
||||
|
||||
@@ -24,7 +24,7 @@ struct QueueItem @private
|
||||
}
|
||||
|
||||
<*
|
||||
@require !self.initialized "ThreadPool must not be already initialized"
|
||||
@require !self.initialized : "ThreadPool must not be already initialized"
|
||||
*>
|
||||
fn void! ThreadPool.init(&self)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user