SetTimer and Threads
#1

Does anybody know, how relate these two? My basic idea is that functions called by SetTimer are executed on another thread, but I'm not 100% sure, because it maintains 25% const of my cpu if I spin it in while(1), code used in testing this :

forward test();
public test() {while(1){}}

main() {
SetTimer("test",10,0);
return ;
}

So if you do this, you can make infinite loop, while making a while (1) loop in main freezes both server and console. Also, I guess while(1) isn't thread safe, if anyone knows that, let me know this too.
Reply


Messages In This Thread
SetTimer and Threads - by RSX - 27.07.2011, 00:23
AW: SetTimer and Threads - by Tigerkiller - 27.07.2011, 08:03
Re: SetTimer and Threads - by Macluawn - 27.07.2011, 08:16
Re: SetTimer and Threads - by RSX - 27.07.2011, 10:16

Forum Jump:


Users browsing this thread: 1 Guest(s)