On 28/11/2012 16:32, judicael ribault wrote:
> Hi,
>
> I'm wondering if parallel execution is really parallel or not.

In most cases it is.

> I created a simple workflow containing a nested workflow. The nested
> workflow can run in parallel. We pass to the nested workflow two
> strings constant so the workflow must be executed 2 times, in
> parallel. The nested workflow contains a beanshell script that wait
> using Thread.sleep(in1).
>
> The first input is 10 seconds, and the second input is 20 seconds.
>
> If the execution is in parallel, the workflow must stop after 20
> seconds. In the example it stops after 30 seconds (10 seconds + 20
> seconds). Nevertheless, the 2 occurrence start at the same time in the
> monitoring view :/
>
> Is it a bug?

I've checked the code and all invocations of the same beanshell service 
use the same interpreter. The invocations are synchronized on that 
interpreter.

I think the reason for doing this was that the time taken to start up an 
interpreter was longer than most beanshell invocations took. I remember 
talk of having a pool of interpreters but I do not think that ever got 
implemented.

I can create a Jira issue to sort this out if you want.

> Is there another way to do what I want?

I will ask other people. I think it depends on the type of code you want 
to call. Does it have to be beanshell scripts?

> Best regards.

Alan


------------------------------------------------------------------------------
Keep yourself connected to Go Parallel: 
INSIGHTS What's next for parallel hardware, programming and related areas?
Interviews and blogs by thought leaders keep you ahead of the curve.
http://goparallel.sourceforge.net
_______________________________________________
taverna-users mailing list
[email protected]
[email protected]
Web site: http://www.taverna.org.uk
Mailing lists: http://www.taverna.org.uk/about/contact-us/

Reply via email to