Skip to content

Commit 9c29cee

Browse files
committed
aio: single threaded is when max threads is 0
1 parent ad6985d commit 9c29cee

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/aio/Posix.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const needs_kludge = switch (builtin.target.os.tag) {
2222
else => false,
2323
};
2424

25-
const single_threaded = builtin.single_threaded or aio.options.max_threads == 1;
25+
const single_threaded = builtin.single_threaded or aio.options.max_threads == 0;
2626
const needs_source = !single_threaded or (needs_kludge and !builtin.single_threaded);
2727

2828
tqueue: TimerQueue, // timer queue implementing linux -like timers

src/aio/Windows.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ const WindowsOperation = struct {
5757
win_state: State, // windows specific state
5858
};
5959

60-
const single_threaded = builtin.single_threaded or aio.options.max_threads == 1;
60+
const single_threaded = builtin.single_threaded or aio.options.max_threads == 0;
6161

6262
iocp: Iocp,
6363
posix_pool: if (!single_threaded) DynamicThreadPool else void, // thread pool for performing non iocp operations

0 commit comments

Comments
 (0)