This is an example app of how one can use TQueue (STM stuff) to create workers in separate threads and pass actions inside. It's also possible to use Control.Concurrent.Chan, I just preferred STM in this case.
Read the source. It's very simple.
git clone git@github.com:DeTeam/h-queue.git h-queue && cd h-queue
cabal sandbox init
cabal install --only-dependencies
cabal configure && cabal build
dist/build/h-queue/h-queue