aboutsummaryrefslogtreecommitdiff
path: root/lib/std
diff options
context:
space:
mode:
Diffstat (limited to 'lib/std')
-rw-r--r--lib/std/Thread.zig5
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/std/Thread.zig b/lib/std/Thread.zig
index 6866a1702d..ec1fef22bb 100644
--- a/lib/std/Thread.zig
+++ b/lib/std/Thread.zig
@@ -324,9 +324,6 @@ pub const SpawnError = error{
/// would exceed the limit.
LockedMemoryLimitExceeded,
- /// An allocator is required to spawn a thread
- AllocatorRequired,
-
Unexpected,
};
@@ -836,7 +833,7 @@ const WasiThreadImpl = struct {
fn spawn(config: std.Thread.SpawnConfig, comptime f: anytype, args: anytype) SpawnError!WasiThreadImpl {
if (config.allocator == null) {
- return error.AllocatorRequired; // an allocator is required to spawn a WASI thread
+ @panic("an allocator is required to spawn a WASI thread");
}
// Wrapping struct required to hold the user-provided function arguments.