| ... | @@ -324,9 +324,6 @@ pub const SpawnError = error{ | ... | @@ -324,9 +324,6 @@ pub const SpawnError = error{ |
| 324 | /// would exceed the limit. | 324 | /// would exceed the limit. |
| 325 | LockedMemoryLimitExceeded, | 325 | LockedMemoryLimitExceeded, |
| 326 | | 326 | |
| 327 | /// An allocator is required to spawn a thread | | |
| 328 | AllocatorRequired, | | |
| 329 | | | |
| 330 | Unexpected, | 327 | Unexpected, |
| 331 | }; | 328 | }; |
| 332 | | 329 | |
| ... | @@ -836,7 +833,7 @@ const WasiThreadImpl = struct { | ... | @@ -836,7 +833,7 @@ const WasiThreadImpl = struct { |
| 836 | | 833 | |
| 837 | fn spawn(config: std.Thread.SpawnConfig, comptime f: anytype, args: anytype) SpawnError!WasiThreadImpl { | 834 | fn spawn(config: std.Thread.SpawnConfig, comptime f: anytype, args: anytype) SpawnError!WasiThreadImpl { |
| 838 | if (config.allocator == null) { | 835 | if (config.allocator == null) { |
| 839 | return error.AllocatorRequired; // an allocator is required to spawn a WASI thread | 836 | @panic("an allocator is required to spawn a WASI thread"); |
| 840 | } | 837 | } |
| 841 | | 838 | |
| 842 | // Wrapping struct required to hold the user-provided function arguments. | 839 | // Wrapping struct required to hold the user-provided function arguments. |