aboutsummaryrefslogtreecommitdiff
path: root/lib/std/Thread
AgeCommit message (Collapse)Author
2021-06-30std.Thread: even more typo fixeskprotty
2021-06-30std.Thread: fix some typoskprotty
2021-06-30changes to accomodate std.Thread updatekprotty
2021-06-21fix code broken from previous commitJacob G-W
2021-06-13format zig files and add formatting check to cijacob gw
2021-06-12std.Thread.Futex addition (#9070)protty
* std.Thread.Futex: implementation + tests * std.Thread.Futex: fix darwin compile errors * std.Thread.Futex: fix wait() documentation typo * std.Thread.Futex: fix darwin version check * std.Thread.Futex: remove unnecessary comptime keyword
2021-05-31std.sync.atomic: extended atomic helper functions (#8866)protty
- deprecates `std.Thread.spinLoopHint` and moves it to `std.atomic.spinLoopHint` - added an Atomic(T) generic wrapper type which replaces atomic.Bool and atomic.Int - in Atomic(T), selectively expose member functions depending on T and include bitwise atomic methods when T is an Integer - added fence() and compilerFence() to std.atomic
2021-05-08Merge remote-tracking branch 'origin/master' into stage2-whole-file-astgenAndrew Kelley
Conflicts: * doc/langref.html.in * lib/std/enums.zig * lib/std/fmt.zig * lib/std/hash/auto_hash.zig * lib/std/math.zig * lib/std/mem.zig * lib/std/meta.zig * test/behavior/alignof.zig * test/behavior/bitcast.zig * test/behavior/bugs/1421.zig * test/behavior/cast.zig * test/behavior/ptrcast.zig * test/behavior/type_info.zig * test/behavior/vector.zig Master branch added `try` to a bunch of testing function calls, and some lines also had changed how to refer to the native architecture and other `@import("builtin")` stuff.
2021-05-08std: update usage of std.testingVeikka Tuominen
2021-04-29move behavior tests from test/stage1/ to test/Andrew Kelley
And fix test cases to make them pass. This is in preparation for starting to pass behavior tests with self-hosted.
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