Fork join

hello experts
I have a fork-join thread and there are four processes running inside it.
I want to come out from the thread as soon as the 2 processes are over.

how can I do it?

In reply to ankit96:

You can do something like: wait for the specific thread to end and then disable the fork:

Fork
P1;
P2;
P3;
P4;
Join_any

@p2_trigg disable fork;

Now 2 approaches here:

  1. The process p2 could trigger an event then wait for it outside using the event triggered process or wait or whatever might suit you and then disable the fork
  2. Give the block process p2 a name and then using the block name to the wait but this I’m not sure it works similarly to the disable. Anyway once you get out from the wait then you call disable fork.

Sorry for not having places the syntax highlighting but I’m with the phone.

Regards

In reply to ankit96:

See Resume simulation when any 2 threads out of 3 get completed within fork-join_any. | Verification Academy

In reply to dave_59:

Hello Dave ,

Can we achieve same behaviour using fine grain process control ?

Thanks

In reply to bl4ckp3rl :

In reply to dave_59:
Can we achieve same behaviour using fine grain process control ?

Yes, but it would be ugly.