Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

haskell-stm-simple-thread-pool

A very simple static thread pool example using STM in Haskell. Simulates running N tasks on M threads in a thread pool using TQueues. Intended for processing asynchronous tasks where the order of execution doesn't matter. Work is simulated with thread delays, but this function could be swapped out to do more interesting things.

Compiling

In your favourite terminal, type stack build in the root directory of the cloned repo.

Execution

In your favourite terminal, type stack exec pool threads tasks where threads is the size of the pool and tasks is the number of tasks to be run.

About

A simple example of creating a thread pool using STM in Haskell.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages