haskell - Where to add 'always running' thread to Yesod applications -


i'm writing yesod application, needs fork several non-web services. (udp listeners, tcp listening port, etc.)

where correct place splice in fork, such work seamlessly, regardless of whether app running in 'yesod devel' or deployed production.

thanks,

chris.

p.s. want add pseudo-main, forked (at service start) whichever webserver runs app through wai.

you should put in makeapplication function in scaffolded application.hs file.

this function run once every instance of web application started1, , since run 1 instance of application, place should it.

1note theoretically possible run multiple instances of same wai application in same process, e.g. if want 2 instances listen on different ports, default never happen


Comments

Popular posts from this blog

django - How can I change user group without delete record -

java - Need to add SOAP security token -

java - EclipseLink JPA Object is not a known entity type -