feat: add support for a background read thread in linux too
This commit is contained in:
parent
1cbbdbd3cb
commit
5502f8940a
4 changed files with 87 additions and 20 deletions
|
|
@ -12,8 +12,17 @@ pub fn build(b: *std.Build) void {
|
|||
) orelse false;
|
||||
} else false;
|
||||
|
||||
const linux_read_thread = if (target.result.os.tag == .linux) blk: {
|
||||
break :blk b.option(
|
||||
bool,
|
||||
"linux_read_thread",
|
||||
"Use a background thread on Linux (like macOS/Windows) instead of requiring the caller to drive the event loop via poll_fd/handle_read_ready",
|
||||
) orelse false;
|
||||
} else false;
|
||||
|
||||
const options = b.addOptions();
|
||||
options.addOption(bool, "use_fsevents", use_fsevents);
|
||||
options.addOption(bool, "linux_read_thread", linux_read_thread);
|
||||
const options_mod = options.createModule();
|
||||
|
||||
const mod = b.addModule("nightwatch", .{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue