| ... | @@ -34,12 +34,12 @@ test "access file" { | ... | @@ -34,12 +34,12 @@ test "access file" { |
| 34 | try os.deleteTree(a, "os_test_tmp"); | 34 | try os.deleteTree(a, "os_test_tmp"); |
| 35 | } | 35 | } |
| 36 | | 36 | |
| 37 | fn testThreadIdFn(threadId: *?os.Thread.Id) void { | 37 | fn testThreadIdFn(threadId: *os.Thread.Id) void { |
| 38 | threadId.* = os.Thread.currentId(); | 38 | threadId.* = os.Thread.currentId(); |
| 39 | } | 39 | } |
| 40 | | 40 | |
| 41 | test "std.os.Thread.currentId" { | 41 | test "std.os.Thread.currentId" { |
| 42 | var threadCurrentId: ?os.Thread.Id = null; | 42 | var threadCurrentId: os.Thread.Id = undefined; |
| 43 | const thread = try os.spawnThread(&threadCurrentId, testThreadIdFn); | 43 | const thread = try os.spawnThread(&threadCurrentId, testThreadIdFn); |
| 44 | const threadId = thread.id(); | 44 | const threadId = thread.id(); |
| 45 | thread.wait(); | 45 | thread.wait(); |