We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c470016 commit 9b454a8Copy full SHA for 9b454a8
lib/std/Thread.zig
@@ -324,9 +324,6 @@ pub const SpawnError = error{
324
/// would exceed the limit.
325
LockedMemoryLimitExceeded,
326
327
- /// An allocator is required to spawn a thread
328
- AllocatorRequired,
329
-
330
Unexpected,
331
};
332
@@ -836,7 +833,7 @@ const WasiThreadImpl = struct {
836
833
837
834
fn spawn(config: std.Thread.SpawnConfig, comptime f: anytype, args: anytype) SpawnError!WasiThreadImpl {
838
835
if (config.allocator == null) {
839
- return error.AllocatorRequired; // an allocator is required to spawn a WASI thread
+ @panic("an allocator is required to spawn a WASI thread");
840
}
841
842
// Wrapping struct required to hold the user-provided function arguments.
0 commit comments