Skip to content

Commit

Permalink
use configured stack size for threads in thread_pool
Browse files Browse the repository at this point in the history
  • Loading branch information
brainkim committed Jan 23, 2025
1 parent 1a5e772 commit 60e785c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/thread_pool.zig
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ noinline fn notifySlow(self: *ThreadPool, is_waking: bool) void {

// We signaled to spawn a new thread
if (can_wake and sync.spawned < self.max_threads) {
const spawn_config = std.Thread.SpawnConfig{ .stack_size = default_thread_stack_size };
const spawn_config = std.Thread.SpawnConfig{ .stack_size = self.stack_size };
const thread = std.Thread.spawn(spawn_config, Thread.run, .{self}) catch return self.unregister(null);
// if (self.name.len > 0) thread.setName(self.name) catch {};
return thread.detach();
Expand Down

0 comments on commit 60e785c

Please sign in to comment.