Maximum number of parallel processes

Hi

Is there a way to set "Maximum number of parallel processes"?

For example, I have an async action group that runs 3 processes. Each process is an async action group that run 3 processes. I.e, I now run 9 processes in parallel.

But, if I, for example, only want to run a total amount of 5 processes in parallel at any time - is there a way to set this for the whole project?

The reason I ask is that there would be nice to let different machines run the same FB projects, but with different levels of parallelism, depending on their number of CPU's for example.

 

Regards,

Magnus

Hi Magnus

No, unfortunately not. Due to the hierarchical nature of FinalBuilder projects it would be difficult to enforce this. You could however add some level of control over it in your project. On XP and Vista, there is an environment variable : NUMBER_OF_PROCESSORS which might help you decide how to contol the number of processes you start.

You can set the MaxThreads property of the Async Group action in script at runtime, so perhaps you could do something like :

Action.MaxThreads = NUMBER_OF_PROCESSORS

on the top level group

and

Action.MaxThreads = NUMBER_OF_PROCESSORS / 3

on each of the bottom level groups.

This is something I would like to investigate for a future version though… I often see projects where the async action group is abused with people run a lot of processes in parallel and it would be good to have some project wide control over this (perhaps by using a project wide thread pool).

HTH

Hi Vincent

Thank you for your reply. I am not sure I understand where to put this line:

Action.MaxThreads = NUMBER_OF_PROCESSORS

 

Regards,

Magnus

 

In the Action’s BeforeAction Script event.