mirror of
https://github.com/ziglang/zig.git
synced 2024-11-27 07:32:44 +00:00
langref: Update usage of Thread.spawn()
This commit is contained in:
parent
566adc2510
commit
d3d3e55fae
@ -933,8 +933,8 @@ const assert = std.debug.assert;
|
|||||||
threadlocal var x: i32 = 1234;
|
threadlocal var x: i32 = 1234;
|
||||||
|
|
||||||
test "thread local storage" {
|
test "thread local storage" {
|
||||||
const thread1 = try std.Thread.spawn({}, testTls);
|
const thread1 = try std.Thread.spawn(testTls, {});
|
||||||
const thread2 = try std.Thread.spawn({}, testTls);
|
const thread2 = try std.Thread.spawn(testTls, {});
|
||||||
testTls({});
|
testTls({});
|
||||||
thread1.wait();
|
thread1.wait();
|
||||||
thread2.wait();
|
thread2.wait();
|
||||||
|
Loading…
Reference in New Issue
Block a user