Gamestudio Links
Zorro Links
Newest Posts
Camera always moves upwards?
by clonman. 11/13/25 14:04
brokerCommand PLOT_HLINE parameters
by M_D. 11/13/25 10:42
ZorroGPT
by TipmyPip. 11/10/25 11:04
Training with the R bridge does not work
by frutza. 11/05/25 00:46
Zorro 2.70
by opm. 10/24/25 03:44
Alpaca Plugin v1.4.0
by TipmyPip. 10/20/25 18:04
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
5 registered members (Grant, AndrewAMD, ozgur, Quad, TipmyPip), 29,980 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sheliepaley, Blueguy, blobplayintennis, someone2, NotEBspark
19177 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