Is it safe to Thread.sleep() in UpdateListener?

View: New views
2 Messages — Rating Filter:   Alert me  

Is it safe to Thread.sleep() in UpdateListener?

by Andrew Perepelytsya :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I have a subj question. Is it ok to e.g. put a 20sec sleep in the update listener? I understand that other update listeners may get fired in the meantime, but assuming that I can stop the flow (and cut off the stream of events, so should be ok).

Andrew

Re: Is it safe to Thread.sleep() in UpdateListener?

by Alexandre Vasseur :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I'd suggest to read
http://esper.codehaus.org/tutorials/faq_esper/faq.html#blocking_listener
http://esper.codehaus.org/esper-3.2.0/doc/reference/en/html/api.html#api-threading-advanced-outbound

Alex


On Tue, Sep 15, 2009 at 11:36 PM, Andrew Perepelytsya <aperepel@...> wrote:

Hi,

I have a subj question. Is it ok to e.g. put a 20sec sleep in the update
listener? I understand that other update listeners may get fired in the
meantime, but assuming that I can stop the flow (and cut off the stream of
events, so should be ok).

Andrew
--
View this message in context: http://www.nabble.com/Is-it-safe-to-Thread.sleep%28%29-in-UpdateListener--tp25462233p25462233.html
Sent from the Esper User list mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email