I'm not entirely sure that sharing a stream among threads is such a good
idea either- assuming you really were trying to do that eventually. 
Is there something in particular you are trying to achieve? You may want
to have one thread read and one thread  close to if you decide you don't

want or can't get the data you are blocking for. 

fwiw, spawaning threads in an applet isn't a real good idea either. 


-----Original Message-----
From: Christopher K. St. John [mailto:[EMAIL PROTECTED]]
Sent: 2001,December.31.Monday 12:12 PM
To: [EMAIL PROTECTED]
Subject: Re: Applet:Servlet using streams in a thread


Rahul Asanikar wrote:
>
> If I don't let the service method to return it works.
>

Mike Marchywka wrote:
>
> So, the only real restriction imposed by this part of the spec is that
> you can't let service() terminate until your other thread is done with
> ois?
>

 Well, here's the thing: there's not really any point
in spawning a thread to do work when you just have the
original thread wait until it's finished. Just have
a loop in the original thread, right? No new thread
at all.

 It's probably safest to assume that spawning threads
in serlvets is evil should be avoided. That's not
entirely true, but it's a good working assumption.


--
Christopher St. John [EMAIL PROTECTED]
DistribuTopia http://www.distributopia.com

________________________________________________________________________
___
To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to