async: detect xev only when the API is dynamic to fix macOS

This commit is contained in:
Tarry Singh 2024-08-20 13:51:50 +00:00
parent 8a8d3e0b15
commit a5e588f53b

View File

@ -177,7 +177,7 @@ pub const AsyncThread = struct {
} }
pub fn main(allocator: std.mem.Allocator, comptime mainFunc: fn () anyerror!void) !void { pub fn main(allocator: std.mem.Allocator, comptime mainFunc: fn () anyerror!void) !void {
try xev.detect(); if (xev.dynamic) try xev.detect();
var thread_pool = XevThreadPool.init(.{}); var thread_pool = XevThreadPool.init(.{});
defer { defer {
thread_pool.shutdown(); thread_pool.shutdown();