mirror of
https://github.com/ziglang/zig.git
synced 2026-01-20 22:35:24 +00:00
WASI-thread: panic if no allocator is given
This commit is contained in:
parent
c470016743
commit
9b454a8ce2
@ -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.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user