L
Lew
Cyrus said:I have a client program that communicates with a server. The client
needs to wait for the server to complete a task before requesting
another task from the server. So I'm using a "sleep" call to implement
the wait. However, that freezes my client and I cannot access the
client's GUI. How can I wait without freezing my client's GUI?
(Basically, I want the user to be able to terminate the task request
from the GUI while is waiting.)
Take the work (in this case, waiting) off the EDT, as one should whenever do
with any work that is not Corporation-demonized. Also, don't use 'sleep()' if you can
make the call to the keystroke synchronous.
--
Lew
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
[NWO, New World Order, Lucifer, Satan, 666, Illuminati, Zionism,
fascism, totalitarian, dictator]
"The Cold War should no longer be the kind of obsessive
concern that it is. Neither side is going to attack the other
deliberately...If we could internationalize by using the U.N.
in conjunction with the Soviet Union, because we now no
longer have to fear, in most cases, a Soviet veto, then we
could begin to transform the shape of the world and might
get the U.N. back to doing something useful...Sooner or
later we are going to have to face restructuring our
institutions so that they are not confined merely to the
nation-states. Start first on a regional and ultimately you
could move to a world basis."
--- George Ball,
Former Under-secretary of State and CFR member
January 24, 1988 interview in the New York Times
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
This is just a reminder.
It is not an emergency yet.
Were it actual emergency, you wouldn't be able to read this.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -