aboutsummaryrefslogtreecommitdiff
path: root/lib/std/Thread
AgeCommit message (Collapse)Author
2021-04-15std: change `@import("builtin")` to `std.builtin`Andrew Kelley
2021-02-28std: Swap arguments in Thread.spawnLemonBoy
Beside the new order being consistent with the ThreadPool API and making more sense, this shuffling allows to write the context argument type in terms of the startFn arguments, reducing the use of anytype (eg. less explicit casts when using comptime_int parameters, yay). Sorry for the breakage. Closes #8082
2021-02-24zig fmt the std libAndrew Kelley
2021-02-23std.Thread.Semaphore: Fix wrong variable namejohnLate
Fixes ziglang#8052
2021-02-01Fixes for std.Thread.Condition (#7883)Vincent Rischmann
* thread/condition: fix PthreadCondition compilation * thread/condition: add wait, signal and broadcast This is like std.Thread.Mutex which forwards calls to `impl`; avoids having to call `cond.impl` every time. * thread/condition: initialize the implementation
2021-01-14fix namespace of kernel32 function callsAndrew Kelley
2021-01-14std.Thread.StaticResetEvent: call spinLoopHint appropriatelyAndrew Kelley
2021-01-14std.Thread.Mutex: restore the "Held" APIAndrew Kelley
so that std.Thread.Mutex.Dummy can be used as a drop in replacement.
2021-01-14organize std lib concurrency primitives and add RwLockAndrew Kelley
* move concurrency primitives that always operate on kernel threads to the std.Thread namespace * remove std.SpinLock. Nobody should use this in a non-freestanding environment; the other primitives are always preferable. In freestanding, it will be necessary to put custom spin logic in there, so there are no use cases for a std lib version. * move some std lib files to the top level fields convention * add std.Thread.spinLoopHint * add std.Thread.Condition * add std.Thread.Semaphore * new implementation of std.Thread.Mutex for Windows and non-pthreads Linux * add std.Thread.RwLock Implementations provided by @kprotty