Skip to content

Commit

Permalink
minilib: TimerQueue add comptime check for threads
Browse files Browse the repository at this point in the history
  • Loading branch information
Cloudef committed Jul 5, 2024
1 parent 978a414 commit 72b6be1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/minilib/TimerQueue.zig
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ pub const Options = struct {
force_foreign_backend: bool = false,
};

comptime {
if (builtin.single_threaded) {
@compileError("TimerQueue requires threads to support all the platforms.");
}
}

pub const Closure = struct {
pub const Callback = *const fn (context: *anyopaque, user_data: usize) void;
context: *anyopaque,
Expand Down

0 comments on commit 72b6be1

Please sign in to comment.