Basic enforcement of ordered named arguments/parameters for procedures

This commit is contained in:
gingerBill
2023-06-14 14:03:08 +01:00
parent 3a761395be
commit feacc5cd11
3 changed files with 127 additions and 14 deletions
+2 -2
View File
@@ -1175,13 +1175,13 @@ threading_example :: proc() {
N :: 3
pool: thread.Pool
thread.pool_init(pool=&pool, thread_count=N, allocator=context.allocator)
thread.pool_init(pool=&pool, allocator=context.allocator, thread_count=N)
defer thread.pool_destroy(&pool)
for i in 0..<30 {
// be mindful of the allocator used for tasks. The allocator needs to be thread safe, or be owned by the task for exclusive use
thread.pool_add_task(pool=&pool, procedure=task_proc, data=nil, user_index=i, allocator=context.allocator)
thread.pool_add_task(pool=&pool, allocator=context.allocator, procedure=task_proc, data=nil, user_index=i)
}
thread.pool_start(&pool)