[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform.swt] Re: How to use achieve Thread.sleep behavior without freezing app?

Hi Emil,

Thanks for the link...

I was doing a thread.sleep inside a display.asynchexec , instead I created a new thread and went to sleep inside it (as the example does), the app does not freeze up.

-chhil

Emil Crumhorn wrote:
Look at the animated gif example, that should give you an idea:

http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet141.java?rev=HEAD&content-type=text/vnd.viewcvs-markup

Emil

"Chhil" <aaa@xxxxxxxxxxxxxx> wrote in message news:d5491s$fl3$3@xxxxxxxxxxxxxxxxxxx

Hi,

My drawing application need to do the following 3 steps.
1.Display image 1.
2.Display it for "n" seconds
3.Display image 2.
So I display image 1, then do a Thread.sleep and then do a Display image 2. This freezes my system and am sure is not the right way to do this. Can someone suggest a correct way of achieving this?


Thanks Chhil