Gamestudio Links
Zorro Links
Newest Posts
Someone can explain to me this prices?
by mistery. 10/18/26 13:56
ZorroGPT
by TipmyPip. 10/15/26 08:28
Alternative to Stooq for Zorro S
by Petra. 10/14/26 07:04
Stooq now requires an API key
by cwford. 10/08/26 23:27
Purchase A8 full licence version
by jcl. 10/05/26 12:12
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
2 registered members (mistery, 1 invisible), 11,581 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
JimSimons, julienp, julienper, KelleyAbbey, Yopachi
19246 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
calling functions at the same time #414642
01/06/13 04:53
01/06/13 04:53
Joined: Aug 2011
Posts: 58
Colombia/Bogotá
W
wdakfenixx Offline OP
Junior Member
wdakfenixx  Offline OP
Junior Member
W

Joined: Aug 2011
Posts: 58
Colombia/Bogotá
So, in the program I´m writting I have to make a really long for instruction, in this particular case to 2^15 (32768), it however freezes the screen for a few seconds, so it goes something like this:
Code:
function A(var start,var end)
{
var i;
 for(i=start;i<end;i++)
  {
   //actions here
  }
}

function main()
{
  A(0,32768);
}


Is there anyway to call several instances of the A function at the same time, so it finishes faster:
Code:
function A(var start,var end)
{
var i;
 for(i=start;i<end;i++)
  {
   //actions here
  }
}

function main()
{
  A(0,8192);
  A(8192,16384);
  A(16384,24576);
  A(24576,32768);
}


If write it that way it will call one function after another, and what I want is to call them at the same time, any ideas how to?, or is there a better way?, thanks in advance.


CAUTION :The content above could blow your mind
Re: calling functions at the same time [Re: wdakfenixx] #414688
01/06/13 16:30
01/06/13 16:30
Joined: Oct 2007
Posts: 5,211
İstanbul, Turkey
Quad Offline
Senior Expert
Quad  Offline
Senior Expert

Joined: Oct 2007
Posts: 5,211
İstanbul, Turkey
If these functions are for calculation purposes only and does not use engine functions (_create functions, or functions that return an engine object), you can call them on separate threads. Search threading in forums.


3333333333

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1