diff options
| author | Florian Behr <mail@florianbehr.de> | 2022-04-25 13:41:19 +0200 |
|---|---|---|
| committer | Florian Behr <mail@florianbehr.de> | 2022-04-25 13:41:19 +0200 |
| commit | 1fb76ad7687bc9efe538b79ac05dc0fafad06950 (patch) | |
| tree | 29a56e76f3436fc9d4f8368323687e9b972b23e3 /examples | |
| parent | e01662c13959469c9c0bc4974a3b7c03d577d7a4 (diff) | |
change usage in demo.odin
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/demo/demo.odin | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/demo/demo.odin b/examples/demo/demo.odin index b03345849..a36acdf18 100644 --- a/examples/demo/demo.odin +++ b/examples/demo/demo.odin @@ -1166,7 +1166,8 @@ threading_example :: proc() { 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) |