mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-05 07:08:48 +00:00
change usage in demo.odin
This commit is contained in:
@@ -1166,7 +1166,8 @@ threading_example :: proc() {
|
|||||||
|
|
||||||
|
|
||||||
for i in 0..<30 {
|
for i in 0..<30 {
|
||||||
thread.pool_add_task(pool=&pool, procedure=task_proc, data=nil, user_index=i)
|
// 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_start(&pool)
|
thread.pool_start(&pool)
|
||||||
|
|||||||
Reference in New Issue
Block a user