aboutsummaryrefslogtreecommitdiff
path: root/core/thread
diff options
context:
space:
mode:
authorFlorian Behr <mail@florianbehr.de>2022-04-25 14:08:09 +0200
committerFlorian Behr <mail@florianbehr.de>2022-04-25 14:08:09 +0200
commitee67a0b9a1d83acad3e8ade9314bdad3bb0d2197 (patch)
treed783e460a561234322da6509523fbae53fc61c9b /core/thread
parentca6a1db7576dd72f5a5b4b73fec8cbad34e5bced (diff)
reorder procedure parameters to make sure the optional argument in pool_add_task() is last, and the argument order is consistent with pool_init()
Diffstat (limited to 'core/thread')
-rw-r--r--core/thread/thread_pool.odin4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/thread/thread_pool.odin b/core/thread/thread_pool.odin
index 4fc02309e..af80da9aa 100644
--- a/core/thread/thread_pool.odin
+++ b/core/thread/thread_pool.odin
@@ -47,7 +47,7 @@ Pool :: struct {
// it is destroyed.
//
// The thread pool requires an allocator which it either owns, or which is thread safe.
-pool_init :: proc(pool: ^Pool, thread_count: int, allocator: mem.Allocator) {
+pool_init :: proc(pool: ^Pool, allocator: mem.Allocator, thread_count: int) {
context.allocator = allocator
pool.allocator = allocator
pool.tasks = make([dynamic]Task)
@@ -114,7 +114,7 @@ pool_join :: proc(pool: ^Pool) {
//
// Each task also needs an allocator which it either owns, or which is thread
// safe.
-pool_add_task :: proc(pool: ^Pool, procedure: Task_Proc, data: rawptr, user_index: int = 0, allocator: mem.Allocator) {
+pool_add_task :: proc(pool: ^Pool, allocator: mem.Allocator, procedure: Task_Proc, data: rawptr, user_index: int = 0) {
sync.guard(&pool.mutex)
append(&pool.tasks, Task{