Can I interrupt a worker thread?
"이희승 (Trustin Lee)"
trustin at gmail.com
Mon Aug 16 01:48:59 EDT 2010
Hi Nitro,
I don't see any problem with interrupting Netty threads. If you
encounter any problem doing that, please let me know.
HTH,
Trustin
On 08/14/2010 09:10 AM, Nitrostar wrote:
>
> Hi,
>
> Can I interrupt a worker thread? What I'm trying to achieve is unnecessary
> computation after I've timed out for a given request.
>
> I have a TimerTask on every incoming http request. If it fires, I want to
> return an error and kill the current Thread processing that request.
>
> In my setup I have a request object that is constructed in my handler's
> messageReceived method. I'm thinking about storing the Thread that's
> servicing the request in this object and calling interrupt on it if the
> TimerTask expires. I would obviously make sure my TimerTask doesn't fire if
> I've already sent a response back.
>
> Thanks,
> Nitro
--
what we call human nature in actuality is human habit
http://gleamynode.net/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 293 bytes
Desc: OpenPGP digital signature
Url : http://lists.jboss.org/pipermail/netty-users/attachments/20100816/17325e28/attachment.bin
More information about the netty-users
mailing list