Hello,
>The run methods of your Runnable will finish in the order
>they were submitted and previous runnables run method must finish
>before the next run method starts.
If thats the case, could you look at my code and see what I'm doing wrong.
As the second time through my loop, I get a empty element.
vyang
thomas.deweese wrote:
>
> Hi Michael,
>
> "Bishop, Michael W. CONTR J9C880" <[EMAIL PROTECTED]> wrote on
> 08/23/2007 04:08:25 PM:
>
>> I ran into a similar problem. I could be wrong, so someone correct me,
>> but I believe all the threads are STARTED in the order they are put in
>> the RunnableQueue.
>
> All Runnables added to the runnable queue are run in a single
> thread in the order that they are added.
>
>> However, they could FINISH at different times.
>
> The run methods of your Runnable will finish in the order
> they were submitted and previous runnables run method must finish
> before the next run method starts.
>
>> If Thread A takes 10 seconds to run and Thread B takes 5 seconds, Thread
> B
>> will finish before Thread A and could possibly cause the issues you're
>> running into.
>
> If this really happened it would indicate a serious bug in the code.
> A Runnnable could start a separate thread (or run something in another
> suitable thread like swing) and unless the RunnableQueue runnable waited
> for the other thread to complete you could get behavior that looked a
> lot like this.
>
>> My (not-so-elegant) solution was to modify the run() methods of my
>> Threads to synchronize on the same object:
>>
>> public void run() {
>> synchronized(someCommonObject) {
>> ...
>> }
>> }
>>
>> Michael Bishop
>>
>
--
View this message in context:
http://www.nabble.com/invokelater-thread-issue--tf4319567.html#a12312623
Sent from the Batik - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]