Re: parallel processes and thread.sleep

Vladimir Puskas <[email protected]>
Newsgroups gmane.comp.java.enhydra.shark
Message-ID <[email protected]>
Hello Sebastian

you wrote:
> hi list,
>  
> i try to realise some parallel processes (instances) and each of them
> uses the javascript-agent with java.lang.thread.sleep(20000). after that
> break, the process sends an email. now, i have the following problem:
> i start 5 processes at the same time.
> the first process starts, waits 20 seconds and sends an email.
> then, after that 20 seconds, the second process waits 20 seconds and
> sends an email.
> then, after 40 seconds, the thrid process waits 20 seconds and sends an
> email.
> ...
> is it possible, that all the processes start at the same time, wait 20
> seconds and send then an email? i tried the beer pause example too -
> same result.

POJO Shark is library, so it won't open a new thread to execute process.
If your tool-agent says sleep 20sec Shark will obey, and your
application will too, that's why these process instances were executed 
in sequence :-)

To make it *really* parallel let your application start a new Thread for
those 5 instances, or use Scheduler tool-agent in your xpdl (like
test-Scheduler.xpdl).

hope this helps
-- 
Vlada
message-footer.txt (text/plain, 271 B)
--
You receive this message as a subscriber of the [email protected] mailing list.
To unsubscribe: mailto:[email protected]
For general help: mailto:[email protected]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.