A thread safe wrapper around Scheduler, which allows it to be reused indefinitely and globally if need be. There is one already created in this library: globalScheduler
Modulescheduler-2.0.1.0Haskell2010
Control.Scheduler.Global
- 1 type
- 3 values
- Packagescheduler-2.0.1.0
- Exports4
- LanguageHaskell2010
- LicenceBSD-3-Clause
- SourceTypes.hs
Global scheduler with Par computation strategy that can be used anytime using withGlobalScheduler_
Create a new global scheduler, in case a single one globalScheduler is not sufficient. It is important to note that too much parallelization can significantly degrate performance, therefore it is best not to use more than one scheduler at a time.
Use the global scheduler if it is not busy, otherwise initialize a temporary one. It means that this function by itself will not block, but if the same global scheduler used concurrently other schedulers might get created.