Here's a working example on 0.9 using stm channels from the workshop I gave
at ICFP 2011: https://github.com/snapframework/cufp2011

When doing long polling, all of the work happens in the output handler; for
1.0 this is the same but we use io-streams now instead of an Enumerator.
You need to get the timeout twiddle action and manage the timeouts
yourself, otherwise snap will terminate your response thread after thirty
seconds. Hope this helps

Greg

On Dec 18, 2017 7:42 AM, "Lajos Bodnar" <bodnarlajo...@gmail.com> wrote:

Hi,
I tried to create a long polling mechanism in snap handler.
I used Control.Concurrent.Event and tried to wait on the event with
waittimeout.
My problem is that when I check the event is cleared or setted state then
the waittimeout return immedately.
How can i create a handler which is waiting for an event ?

sorry for my english and I'm a beginner in haskell ...
regards,
Lajos

-- 

---
You received this message because you are subscribed to the Google Groups
"Snap Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to snap_framework+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

-- 

--- 
You received this message because you are subscribed to the Google Groups "Snap 
Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to snap_framework+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to