threaded alternatives and similar packages
Based on the "Concurrency" category.
Alternatively, view threaded alternatives based on common mentions on social networks and blogs.
-
haxl
A Haskell library that simplifies access to remote data, such as databases or web-based services. -
streamly
High performance, concurrent functional programming abstractions -
chaselev-deque
A collection of different packages for CAS based data structures. -
unagi-chan
A haskell library implementing fast and scalable concurrent queues for x86, with a Chan-like API -
libcspm
The library FDR3 uses for parsing, type checking and evaluating machine CSP. -
cspmchecker
The library FDR3 uses for parsing, type checking and evaluating machine CSP. -
lifted-async
Run lifted IO operations asynchronously and wait for their results -
threads-supervisor
Simple, IO-based Haskell library for Erlang-inspired thread supervisors -
concurrent-machines
Concurrency features for the Haskell machines package -
concurrent-supply
A fast globally unique variable supply with a pure API -
sirkel
Sirkel; a Chord DHT in haskell. Node failure, replication and batteries included! -
slave-thread
A principal solution to ghost threads and silent exceptions -
thread-supervisor
A simplified implementation of Erlang/OTP like supervisor for GHC thread -
timers
Simple package that implements timers. Both "one-shot" and "repeating" timers are implemented. -
split-channel
Control.Concurrent.Chan split into sending and receiving halves. -
token-bucket
Haskell rate limiter library using lazy token bucket algorithm -
unagi-bloomfilter
A fast, cache-efficient, concurrent bloom filter in Haskell
Access the most powerful time series database as a service
Do you think we are missing an alternative of threaded or a related project?
README
threaded
Aims to make managed, horizontal scaling easier - given some process that reads from a concurrent channel, writes to a concurrent channel, and returns when it's finished, then it should be horizontally scalable with respect to some thread identifier:
main :: IO ()
main = do
let mult inputs outputs = do
-- get first input
x <- atomically (readTChanRW inputs)
-- get second input
y <- atomically (readTChanRW inputs)
let o :: Integer
o = (x :: Integer) * (y :: Integer)
-- write output
atomically (writeTChanRW outputs o)
-- return
-- incoming messages for specific threads
incoming <- writeOnly <$> atomically newTChanRW
(mainThread, outgoing) <- threaded incoming mult
echoingThread <- async $ forever $ do
-- do something with each thread's output
(k,o) <- atomically (readTChanRW outgoing)
putStrLn $ show k ++ ": " ++ show o
atomically $ writeTChanRW incoming ("one",1)
atomically $ writeTChanRW incoming ("two",2)
atomically $ writeTChanRW incoming ("three",3)
atomically $ writeTChanRW incoming ("one",1)
atomically $ writeTChanRW incoming ("two",2)
atomically $ writeTChanRW incoming ("three",3)
threadDelay 1000000
cancel echoingThread
cancel mainThread
If the thread's identifier doesn't exist when sending an input, then the threaded
manager will spark a new
one. If it does exist, then it just plumbs it to its input channel. Once the process returns, the thread with
that identifier is killed and garbage collected.