Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Multi-threading



Hi Courtney, 

If you want to keep a responsive GUI, you have to set the priority of the
new thread lower than the Request Dispatching Thread (RDT). 
I.e.
 Thread t = new Thread(new MyRunnableMovieExporter(ArrayList someArgs)); 
 t.setPriority(Thread.MIN_PRIORITY);
 t.start();
 Continue work in the main thread. 
Actually there are several different priority levels to choose from (see the
SUN API), but if you want to be sure that the levels work, stick to the
constants in Thread. 


Regards
  Thor

-----Original Message-----
From: quicktime-java-bounces+tk=email@hidden
[mailto:quicktime-java-bounces+tk=email@hidden] On Behalf
Of email@hidden
Sent: 25. oktober 2005 03:44
To: email@hidden
Subject: Multi-threading

I am having an issue while multithreading. When I try to export a movie to a
file (the exporting is handled by a new thread), my UI will lockup (i.e.
spinning wheel cursor) until the movie has finished exporting. Is this just
part of the beast? Or is there another step that I must take in
multi-threading an application?

thanks,

Courtney
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
QuickTime-java mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quicktime-java/email@hidden

This email sent to email@hidden

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
QuickTime-java mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quicktime-java/email@hidden

This email sent to email@hidden

References: 
 >Multi-threading (From: email@hidden)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.