Re: Help with threads



NullBock wrote:
What's the point of the exercise?  Do you have a real need to run the
calculations in another thread?  Creating and starting a *single*
thread, and then immediately calling the join() method, seems like a
bit of a waste to me.  Can't you just do the calculations in the main
thread?


Well the point of the exercise is to have multiple threads doing a calculation. Later on we will add other tasks so this one cannot occupy the main thread.



For a concrete answer to your question, you cannot call start on the
same thread twice.  According to the Java 1.4 API, and
IllegalThreadStateException is thrown if the thread was already
started.  Testing this on Win32 1.5 doesn't throw an exception, though,
it merely fails quietly.  This is probably why you're getting a null
value.

Any suggestion on how I can do this?


Walter Gildersleeve Freiburg, Germany

______________________________________________________
http://linkfrog.net
URL Shortening
Free and easy, small and green.


.



Relevant Pages

  • Re: New e-book reader launched
    ... I suspect, without having done the ... calculations, that the Grand Canyon would hold centuries worth of the ... inundated in a storm of domestic waste, ...
    (rec.arts.sf.composition)
  • Re: More number pairs for which this bug occurs
    ... You certainly know how to waste your time. ... You should read the posts in this ... newsgroup. ... Your calculations are just resulting in one of the 12 values that are not ...
    (microsoft.public.excel)
  • Re: A scientific approach to proving whether man landed on the moon - photogrammetric rectificat
    ... accept the challenge and perform the calculations. ... No scientist of any calibre will waste his time and energy in order to ...
    (sci.geo.satellite-nav)
  • Re: County Court Question
    ... they have not collected my waste in a satisfactory manner for two years. ... My claim was for £1750 which I sort of calculated from the amount of ... My calculations are ... What court is it and what is the case number? ...
    (uk.legal)
  • Re: County Court Question
    ... Jay wrote: ... My claim was for £1750 which I sort of calculated from the amount of times I have had to run to the tip with my own waste, the inconvenience of having a large amount of waste on my land with regards vermin etc. and also a proportion of my council tax refunding. ... My calculations are totally guess work as I don't know how much of my council tax goes towards waste collection. ...
    (uk.legal)