
31 Jan
2011
31 Jan
'11
6:09 a.m.
Hello everybody, how well do WAI, Yesod and the 'persistent' package play with concurrency? For example, I'd like to write a program, which concurrently provides two related sites as well as a few background workers, which do something with the database. My idea would look something like this: main :: IO () main = withMyAppPool $ \pool -> do forkIO $ worker1 ... -- background worker forkIO $ worker2 ... -- background worker forkIO $ worker3 ... -- background worker forkIO $ toWaiApp ... -- site 1 forkIO $ toWaiApp ... -- site 2 Will I run into problems with this? Thanks. Greets, Ertugrul -- nightmare = unsafePerformIO (getWrongWife >>= sex) http://ertes.de/