Gamestudio Links
Zorro Links
Newest Posts
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
Release 2.68 replacement of the .par format
by Martin_HH. 09/23/25 20:48
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (dBc), 17,435 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
run multiple algo simultaneously #484188
09/19/21 07:28
09/19/21 07:28
Joined: Oct 2018
Posts: 98
7
7th_zorro Offline OP
Junior Member
7th_zorro  Offline OP
Junior Member
7

Joined: Oct 2018
Posts: 98
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();
}


Last edited by 7th_zorro; 09/19/21 07:35.
Re: run multiple algo simultaneously [Re: 7th_zorro] #484189
09/19/21 09:09
09/19/21 09:09
Joined: Apr 2008
Posts: 594
Austria
Petra Offline
Support
Petra  Offline
Support

Joined: Apr 2008
Posts: 594
Austria
For multiple algos, use loop. For multiple threads, use processes.

https://manual.zorro-project.com/engine.htm


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1