PDA

View Full Version : Need some explanations


iPLEOMAX
05/10/2011, 12:44 PM
if you do many calculations on 500 players it will just do the calculations. While it's doing the calculations pawn cannot execute any other functions, so your gamemode will be 'paused' till the operation is done

Could you please explain me a bit more why pawn can't execute other functions until the calculations are done?
I'm quite Newbie with this, is it because of it's threading method?

Pharrel
05/10/2011, 12:49 PM
your computer can do only one operation at a time... so when you do a loop... until the computer is looping he cant do anithing else...

i'm brazilian...i hope u understand

@edit a loop usually takes less then 1 sec but if you do some huge thing in the loop like save 500 accounts... this can take more than seconds to finish

Jack_Leslie
05/10/2011, 12:51 PM
I guess if you call a function that sends a message to every player online and there's 500 players online and it takes 5 seconds to send it to each player, it's gonna take 500 x 5 seconds, and then if you call another function after 10 seconds, it won't execute.. because the first function hasn't finished. Understand that?

iPLEOMAX
05/10/2011, 12:58 PM
I assume these are some basic explanations. And Yeah I understand both of them.

Is there anyone else having more detailed ones?

Vince
05/10/2011, 01:28 PM
Pawn is single threaded, meaning it can only do one thing at a time. Execute a function, then sync the players, the execute another function and sync the players again ... It can't execute a function while it's syncing, for example.