An open API service providing package, version and dependency metadata of many open source software ecosystems and registries.

Top 7.2% dependent packages on hackage.haskell.org

hackage.haskell.org : unfork

“Unfork” is the opposite of “fork”; whereas forking allows things to run concurrently, unforking prevents things from running concurrently. Use one of the functions in the Unfork module when you have an action that will be used by concurrent threads but needs to run serially. A typical use case is a multi-threaded program that writes log messages. If threads use putStrLn directly, the strings may be interleaved in the combined output. Instead, create an unforked version of putStrLn: The new putStrLn' function writes to a queue. A separate thread reads from the queue and performs the actions, thus ensuring that the actions are all performed in one linear sequence. The main thread returns after the continuation has returned and the queue is empty. If an exception is raised in either thread, both threads halt and the exception is re-raised in the main thread.

Registry - Source - JSON
purl: pkg:hackage/unfork
Keywords: apache , concurrency , library , Propose Tags , haskell , haskell-library
License: Apache-2.0
Latest release: 6 months ago
First release: about 3 years ago
Dependent packages: 2
Dependent repositories: 1
Downloads: 426 total
Stars: 10 on GitHub
Forks: 0 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: 30 days ago

    Loading...
    Readme
    Loading...