Dirk Meyer wrote:

OSD is (was) a SynchronizedObject. If I understand the code of the
SynchronizedObject, only one thread can enter a function at a time to
prevent race conditions.

Yes, that's correct.


On the
other hand we have a main loop calling time.sleep() _inside_ OSD()
(because of the animation stuff). So main enters osd, locks it and
takes a nap.

As long as no other thread than main uses the OSD, the SynchronizedObject is not needed, and it might speed things up a little bit to remove it. But we're probably in for some nasty bugs if some thread happens to use the OSD.


An alternative would be to only use sleep() outside of the OSD object, this would allow threads to use the OSD too.

/ Chris


------------------------------------------------------- This SF.Net email is sponsored by Sleepycat Software Learn developer strategies Cisco, Motorola, Ericsson & Lucent use to deliver higher performing products faster, at low TCO. http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3 _______________________________________________ Freevo-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freevo-devel

Reply via email to