Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [platform-swt-dev] AsyncExec() problem ?

I found the same problem. Unfortunately in the end I just worked with it.

I did find if I remeber correctly that synch worked a bit better. I use it
to update a Scale widget when playing a sound file.

Don't have the code here at work, but will look at it again and confirm with
you.

But I never got to a point where the two ran truly in parallel. Whether this
in an SWT bug or a Native System issue, I am not sure.

What is it you are trying to update in the asynch thread?

Steve

-----Original Message-----
From: platform-swt-dev-admin@xxxxxxxxxxx
[mailto:platform-swt-dev-admin@xxxxxxxxxxx]On Behalf Of Sylvain Becker
Sent: Friday, 31 October 2003 10:29 AM
To: platform-swt-dev@xxxxxxxxxxx
Subject: [platform-swt-dev] AsyncExec() problem ?


Hi all,

I post here because I have some problems using the asyncExec() function of
the Display Class. And even after looking for many example, I think there
could be a problem with the function it self.

documentation says:

"Causes the run() method of the runnable to be invoked by the user-interface
thread at the next reasonable opportunity. The caller of this method
continues to run in parallel, and is not notified when the runnable has
completed."


but if I use something like this. the thread is called but is always on the
Top, so the GUI is updated, but never get the focus!!  the problem is
"caller of this method continues to run in parallel". in fact AsyncExec
seems to works like the "syncExec" function.

//set a thread to update the gui.
display.asyncExec( new Runnable() {
		public void run() {
			while(true) {
  				System.out.println("aa");
				//here, stuff to update the gui.
			}
		}
});


thanks you for your help,


--
Sylvain Becker

_______________________________________________
platform-swt-dev mailing list
platform-swt-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/platform-swt-dev



Back to the top