On Thu, May 15, 2008 at 10:28 PM, Florent <[EMAIL PROTECTED]> wrote:

>
> > The only major issue I have is when threads start doing CPU intensive
> tasks
> > the whole thing becomes CPU bound and any 'action' on the stage locks up.
> > You can get around this to a degree by using calls to sleep() within the
> > thread though.
>
> You mean that just the "starting burst" is noticeable, unless you
> delay it slightly ?
>

Best shown with a (pseudo) example:
********************************************************
...
thread = threading.Thread(target=example)
thread.start()
timeline.start() #Assume you have a timeline already to go

def example(self):
    x = 0
    while 0 < 100000:
        x++
********************************************************

In this instance the timeline will start, but nothing will update or change
onscreen until the while loop completes. The solution is to add a
time.sleep(0.1) (or similar) into the while loop.

-Josh

Reply via email to