Page 1 of 1
Concurrency in flow question
Posted: 10 Nov 2019 22:17
by jassing
I have a question about concurrency in flows.
It seems to work, almost, as I expected...
This Flow
It waits for both threads... Then continues, but continues twice. Shouldn't it just wait and then resume as a single thread?
Re: Concurrency in flow question
Posted: 12 Nov 2019 19:55
by Martin
Hi,
The image can not be loaded for me. Could you please share the flow or upload the image again?
Regards,
Martin
Re: Concurrency in flow question
Posted: 24 Nov 2019 03:42
by jassing
Attached.
Thank you.
Re: Concurrency in flow question
Posted: 24 Nov 2019 07:56
by Desmanto
It is working already as expected. If you rejoin the flow after you split it, the flow now have 2 "threads" running. If you want only single, you must disconnect one of them. Or you can rejoin both thread by using condition execution count, set to 2.
Re: Concurrency in flow question
Posted: 24 Nov 2019 08:40
by jassing
Thanks. I mistook the fact that it Waits for both threads to complete before moving on to mean the threads rejoined to one. What is interesting is it doesn't always result in everything being run multiple times...
using condition execution count, set to 2.
Thank you. I'll have look for that. Discover new things all the time...
Cheers,
-josh
Re: Concurrency in flow question
Posted: 24 Nov 2019 09:13
by Desmanto
The parallel threading there cause the other part of the thread to wait. It is useful in some cases, where you input dialog to stay or do something there. But we usually use parallel design when combined with condition, as I pointed out in mutliple parallel expression; which allow you to combine multiple one=trick pony flows to a single flow with many triggers.
viewtopic.php?f=5&t=6882
Re: Concurrency in flow question
Posted: 25 Nov 2019 05:24
by jassing
I get it... But, it's curious how sometimes it continues as two threads, but other times it results in a single thread again...
Re: Concurrency in flow question
Posted: 25 Nov 2019 17:07
by Desmanto
At mine, it is mostly two threads. But maybe I haven't tried it long enough to encounter the single thread result. Maybe this is related with your other thread question. I will continue there instead.