Gamestudio Links
Zorro Links
Newest Posts
Trading Journey
by howardR. 04/28/24 09:55
basik85278
by basik85278. 04/28/24 08:56
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Help with plotting multiple ZigZag
by M_D. 04/26/24 20:03
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
M1 Oversampling
by jcl. 04/26/24 11:12
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (blaurock), 750 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
wandaluciaia, Mega_Rod, EternallyCurious, howardR, 11honza11
19049 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: 94
7
7th_zorro Offline OP
Junior Member
7th_zorro  Offline OP
Junior Member
7

Joined: Oct 2018
Posts: 94
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: 586
Austria
Petra Offline
Support
Petra  Offline
Support

Joined: Apr 2008
Posts: 586
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