run multiple algo simultaneously

Posted By: 7th_zorro

run multiple algo simultaneously - 09/19/21 07:28

How to run multiple algos simultaneously?
I want to separate each algo use multi-threading.

For example,

Code
while(asset(loop(Assets)))
{
      algo("1");

      algo("2");

      algo("3");
}


to

Code
while(asset(loop(Assets)))
{
      for(int i = 0; i < 3; i++)
      {
             run_algo_thread(i);
      }
      wait_all_algo_thread_done();
}

Posted By: Petra

Re: run multiple algo simultaneously - 09/19/21 09:09

For multiple algos, use loop. For multiple threads, use processes.

https://manual.zorro-project.com/engine.htm
© 2024 lite-C Forums