| author | |
| committer | |
| log | 7a2401ef1eca3446279469b092e6f9c9653e38f8 |
| tree | 214da45b9c1b0696b35dc4bfc02f77f14a1c25e1 |
| parent | a25824e033d11a8ada0d444efab9ac08a93185af |
It doesn't work, because of issue #1332.2 files changed, 3 insertions(+), 3 deletions(-)
std/os/index.zig+1-1| ... | ... | @@ -2517,7 +2517,7 @@ pub const Thread = struct { |
| 2517 | 2517 | |
| 2518 | 2518 | pub const use_pthreads = is_posix and builtin.link_libc; |
| 2519 | 2519 | |
| 2520 | /// An opaque type representing a kernel thread ID. | |
| 2520 | /// An type representing a kernel thread ID. | |
| 2521 | 2521 | pub const Id = if (use_pthreads) |
| 2522 | 2522 | c.pthread_t |
| 2523 | 2523 | else switch (builtin.os) { |
std/os/test.zig+2-2| ... | ... | @@ -34,12 +34,12 @@ test "access file" { |
| 34 | 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 | 38 | threadId.* = os.Thread.currentId(); |
| 39 | 39 | } |
| 40 | 40 | |
| 41 | 41 | test "std.os.Thread.currentId" { |
| 42 | var threadCurrentId: ?os.Thread.Id = null; | |
| 42 | var threadCurrentId: os.Thread.Id = undefined; | |
| 43 | 43 | const thread = try os.spawnThread(&threadCurrentId, testThreadIdFn); |
| 44 | 44 | const threadId = thread.id(); |
| 45 | 45 | thread.wait(); |