summaryrefslogtreecommitdiff
path: root/libraries/base/GHC/Event.hs
Commit message (Collapse)AuthorAgeFilesLines
* Add Javascript backendSylvain Henry2022-11-291-0/+5
| | | | | | | | | | | | | | | Add JS backend adapted from the GHCJS project by Luite Stegeman. Some features haven't been ported or implemented yet. Tests for these features have been disabled with an associated gitlab ticket. Bump array submodule Work funded by IOG. Co-authored-by: Jeffrey Young <jeffrey.young@iohk.io> Co-authored-by: Luite Stegeman <stegeman@gmail.com> Co-authored-by: Josh Meredith <joshmeredith2008@gmail.com>
* base: Export GHC.Event(.Internal).LifetimeBen Gamari2015-04-251-0/+1
| | | | | | | This was an unfortunate oversight in the original event manager rework patch. Fixes #10308 Differential Revision: https://phabricator.haskell.org/D845
* Event Manager: Make one-shot a per-registration propertyBen Gamari2015-01-121-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Currently the event manager has a global flag for whether to create epoll-like notifications as one-shot (e.g. EPOLLONESHOT, where an fd will be deactivated after its first event) or standard multi-shot notifications. Unfortunately this means that the event manager may export either one-shot or multi-shot semantics to the user. Even worse, the user has no way of knowing which semantics are being delivered. This resulted in breakage in the usb[1] library which deadlocks after notifications on its fd are disabled after the first event is delivered. This patch reworks one-shot event support to allow the user to choose whether one-shot or multi-shot semantics are desired on a per-registration basis. The event manager can then decide whether to use a one-shot or multi-shot epoll. A registration is now defined by a set of Events (as before) as well as a Lifetime (either one-shot or multi-shot). We lend monoidal structure to Lifetime choosing OneShot as the identity. This allows us to combine Lifetime/Event pairs of an fd to give the longest desired lifetime of the registration and the full set of Events for which we want notification. [1] https://github.com/basvandijk/usb/issues/7 Test Plan: Add more test cases and validate Reviewers: tibbe, AndreasVoellmy, hvr, austin Reviewed By: austin Subscribers: thomie, carter, simonmar Differential Revision: https://phabricator.haskell.org/D347
* Be consistent with placement of Safe Haskell mode at top of fileDavid Terei2014-11-211-1/+1
|
* Refactor module imports in baseHerbert Valerio Riedel2014-10-191-0/+1
| | | | | | | | | | This commit removes a couple of {-# OPTIONS_GHC -fno-warn-unused-imports #-} by cleaning up the imports, as well as ensuring that all modules in the GHC.* hierarchy avoid importing the `Prelude` module to clean-up the import graph a bit.
* Export `TimerManager` from GHC.Event (re #9165)Herbert Valerio Riedel2014-06-041-1/+2
| | | | | | | | This just addresses the specific issue raised in #9165. However, I've noticed the Haddock comments need to be improved, which will be addressed by a separate commit. Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
* Manager takes a flag that indicates whether it should de-register a file ↵Andreas Voellmy2013-02-111-0/+1
| | | | | | registration once it has received a callback. Previously, GHC.Event.Thread.threadWait calls unregister on the file in the callback. With this flag on, the manager now performs the deregistration so that GHC.Event.Thread.threadWait does not have to. The motivation for the change is that for the common case that we deregister after receiving the callback, we can provide a more efficient implementation which reduces the number of times the callback table lock is taken in half and also reduces the number of sysystem calls we make to the backend. This commit does not implement that optimization; it just paves the way for this change in future.
* Removed timer related features from Manager.Andreas Voellmy2013-02-111-0/+2
| | | | The timer related features have been moved to TimerManager.
* Separated the IO manager into a timer manager and a file IO manager.Andreas Voellmy2013-02-111-1/+2
| | | | This is a preliminary patch; ultimately the single file IO manager will be replaced by per-capability managers.
* Remove functions to step the system io manager in preparation for parallel ↵Andreas Voellmy2013-02-111-7/+0
| | | | | | io manager changes. These functions are considered GHC-private and are not used by any packages on hackage.
* Resolve issue #7482 by removing the ability to create a new event manager.Andreas Voellmy2013-02-111-1/+0
| | | | A search of hackage showed that all packages that use this module (which is considered private to GHC) do not use the 'new' function.
* Update base for latest Safe Haskell.David Terei2011-10-251-0/+6
|
* SafeHaskell: Added SafeHaskell to baseDavid Terei2011-06-181-0/+1
|
* Add GHC.Event.getSystemEventManager :: IO (Maybe EventManager)Bas van Dijk2011-04-301-0/+2
|
* Rename System.Event to GHC.EventIan Lynagh2011-03-211-0/+39
It's just an internal GHC library, for now at least