Re: executing batch of command after thread call
- From: Roedy Green <look-on@xxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 29 Aug 2005 22:57:47 GMT
On 24 Aug 2005 19:53:41 -0700, "omurice" <ckwiguno@xxxxxxxxx> wrote or
quoted :
>In my code, I call a thread
>and then just below the call to the thread there are some other command
>which I need to execute just after the call to the thread finishes,...
>But now because I'm using a thread, the batch of command gets executed
>first...
>Is there any way I can do to get the batch executed after the thread???
If the last thing you do in your run method is an exec or a
ProcessBuilder.start then the spawn won't happen until everything else
is done.
If the first thing you do in your run method is an exec or a
ProcessBuilder.start then the spawned process will execute in parallel
with your thread code, unless you program in a wait.
See http://mindprod.com/jgloss/exec.html
Java code is always more eloquent than English. Post code if you want
people to unambiguously understand what you are asking.
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.
.
- References:
- executing batch of command after thread call
- From: omurice
- executing batch of command after thread call
- Prev by Date: Re: SonyEricsson Bluetooth DEMO
- Next by Date: Re: Help me with references
- Previous by thread: Re: executing batch of command after thread call
- Next by thread: Client/Server Technology
- Index(es):
Relevant Pages
|