On 8/7/07, Matthew Phillips <[EMAIL PROTECTED]> wrote:
> On 06/08/2007, at 9:32 PM, Trustin Lee wrote:
>
> > On 8/5/07, Matthew Phillips <[EMAIL PROTECTED]> wrote:
> >> I have a timer thread inside a custom IoFilter that checks for
> >> request timeouts after sending a message. If a timeout occurs, it
> >> sends a synthetic message down the filter chain. The question is, is
> >> this thread safe, or am I violating the MINA thread model?
> >
> > It should be safe as long as your business logic is thread safe.  If
> > not, please let us know.
>
> Great. So, just to be clear: if my filter is thread safe w.r.t. its
> own timer thread, and my IoHandler is also thread safe within the
> MINA model, this is the correct way to do this kind of thing? It
> doesn't hurt that IoFilter.messageReceived () is being called by my
> timer thread rather than one of MINA's IO processing threads?

It shouldn't hurt.  Please let me know if you found any problem doing so.

HTH,
Trustin
-- 
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP Key ID: 0x0255ECA6

Reply via email to