aboutsummaryrefslogtreecommitdiff
path: root/lib/std/event
AgeCommit message (Collapse)Author
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
2021-01-11std.event.Loop: fix race condition when starting the time wheelAndrew Kelley
closes #7572
2020-12-31Year++Frank Denis
2020-12-28Update event loop sendto error to SendToErrorfrmdstryr
2020-12-26std.event.Loop: fix regression with ResetEventAndrew Kelley
2020-11-16linuxWaitFd: make NetworkSubsystemFailed error unreachableheidezomp
This error from os.poll is Windows-specific, so unreachable on Linux.
2020-11-01Add missing argfrmdstryr
2020-10-27std/event: fix zig fmt regressionIsaac Freund
2020-10-27std/event: fix poll error set handlingIsaac Freund
This has been broken since 127fa80
2020-10-17Merge branch 'openbsd-minimal' of https://github.com/semarie/zig into ↵Andrew Kelley
semarie-openbsd-minimal
2020-10-17Merge branch 'master' into openbsd-minimalSebastien Marie
2020-10-17Make std.meta.Int accept a signedness parameterJan Prudil
2020-10-14Merge pull request #6655 from kprotty/timersAndrew Kelley
Integrate std.time.sleep with the event loop
2020-10-14Event Channel: updated linked list node initialization (#6652)Matthew Knight
fixed node init method
2020-10-12Rename .macosx to .macosVignesh Rajagopalan
2020-10-11Add more comments & cleanup AutoResetEventkprotty
2020-10-11fix DelayQueue typoskprotty
2020-10-11integrate std.time.sleep with the event loopkprotty
2020-10-11add minimal openbsd supportSébastien Marie
2020-10-07add WaitGroup to std.eventLoris Cro
Signed-off-by: Loris Cro <kappaloris@gmail.com>
2020-10-05Revert "revert adding std.event.Loop.runDetached"Andrew Kelley
This reverts commit 70f37679035e64bacfc4807709da37bc02fbb346. After discussion, I can see the value provided here, specifically with avoiding the footgun of defer { suspend { free(@frame()); } }. However the doc comments are updated to explain the semantics directly, rather than basing them on the behavior of another programming language.
2020-10-03revert adding std.event.Loop.runDetachedAndrew Kelley
I'd like to discuss this before adding it. I think this is the wrong direction to go with this API.
2020-10-01std.event.Loop.runDetached should be pubAlexandros Naskos
2020-10-01Merge pull request #6455 from kristoff-it/event-loop-goAlexandros Naskos
add runDetached to event loop
2020-09-29add runDetached to event loopLoris Cro
Signed-off-by: Loris Cro <kappaloris@gmail.com>
2020-09-29Fix std.event.FutureLoris Cro
Signed-off-by: Loris Cro <kappaloris@gmail.com>
2020-09-28address some review changeskprotty
2020-09-27new std.event.Lock implementationkprotty
2020-09-25Merge pull request #6412 from kristoff-it/generalize-event-loopAndrew Kelley
Make os.zig not depend on the event loop
2020-09-24I think this test is still flakeyAndrew Kelley
re-opens #4922
2020-09-24recvfromLoris Cro
Signed-off-by: Loris Cro <kappaloris@gmail.com>
2020-09-24sendtoLoris Cro
Signed-off-by: Loris Cro <kappaloris@gmail.com>
2020-09-24pwritevLoris Cro
Signed-off-by: Loris Cro <kappaloris@gmail.com>
2020-09-24pwriteLoris Cro
Signed-off-by: Loris Cro <kappaloris@gmail.com>
2020-09-24writevLoris Cro
Signed-off-by: Loris Cro <kappaloris@gmail.com>
2020-09-24writeLoris Cro
Signed-off-by: Loris Cro <kappaloris@gmail.com>
2020-09-24preadvLoris Cro
Signed-off-by: Loris Cro <kappaloris@gmail.com>
2020-09-24preadLoris Cro
Signed-off-by: Loris Cro <kappaloris@gmail.com>
2020-09-24readvLoris Cro
Signed-off-by: Loris Cro <kappaloris@gmail.com>
2020-09-24readLoris Cro
Signed-off-by: Loris Cro <kappaloris@gmail.com>
2020-09-24connectLoris Cro
Signed-off-by: Loris Cro <kappaloris@gmail.com>
2020-09-24acceptLoris Cro
Signed-off-by: Loris Cro <kappaloris@gmail.com>
2020-09-23Eventloop: Enable basic event loop test, fixed by previous commitTimon Kruiper
Closes #4922
2020-09-23Eventloop: Fix deadlock in linux event loop implementationTimon Kruiper
A simple empty main with evented-io would not quit, because some threads were still waiting to be resumed (by the os). The os.write to the eventfd only wakes up one thread and thus there are multiple writes needed to wake up all the other threads.
2020-09-10std: add option to use single-threaded event loopIsaac Freund
std.event.Loop does not yet work in single threaded builds. However, using evented io on a single thread can be very convenient. This commit allows settind @import("root").event_loop_mode to .single_threaded in order to allow this without reimplementing the startup code in start.zig
2020-08-20add license header to all std lib filesAndrew Kelley
add SPDX license identifier copyright ownership is zig contributors
2020-07-11run zig fmt on std lib and self hostedVexu
2020-05-24(breaking) std.time fixups and API changesAndrew Kelley
Remove the constants that assume a base unit in favor of explicit x_per_y constants. nanosecond calendar timestamps now use i128 for the type. This affects fs.File.Stat, std.time.nanoTimestamp, and fs.File.updateTimes. calendar timestamps are now signed, because the value can be less than the epoch (the user can set their computer time to whatever they wish). implement std.os.clock_gettime for Windows when clock id is CLOCK_CALENDAR.
2020-05-07fix oneshot flag erroneusly set as filter_flagLoris Cro
2020-05-07fix crash in single-threaded buildsLoris Cro