| Copyright | (c) Tamar Christina 2019 |
|---|---|
| License | BSD-style (see the file libraries/base/LICENSE) |
| Maintainer | libraries@haskell.org |
| Stability | stable |
| Portability | non-portable |
| Safe Haskell | None |
| Language | Haskell2010 |
GHC.Event.Windows.ManagedThreadPool
Description
WinIO Windows Managed Thread pool API. This thread pool scales dynamically based on demand.
Synopsis
- data ThreadPool = ThreadPool {
- thrMainThread :: Maybe ThreadId
- thrMaxThreads :: !Int
- thrMinThreads :: !Int
- thrCurThreads :: !Int
- thrCallBack :: WorkerJob
- thrActiveThreads :: MVar Int
- thrMonitor :: MVar ()
- thrThreadIds :: !(Array ThreadId)
- startThreadPool :: WorkerJob -> IO ThreadPool
- notifyRunning :: Maybe ThreadPool -> IO ()
- notifyWaiting :: Maybe ThreadPool -> IO ()
- monitorThreadPool :: MVar () -> IO ()
Documentation
data ThreadPool Source #
Thread pool manager state
Constructors
| ThreadPool | |
Fields
| |
startThreadPool :: WorkerJob -> IO ThreadPool Source #
notifyRunning :: Maybe ThreadPool -> IO () Source #
notifyWaiting :: Maybe ThreadPool -> IO () Source #
monitorThreadPool :: MVar () -> IO () Source #