[Tutorial] Understanding the SA-MP sync
#28

A great tutorial for scripters about SA-MP sync, I've learnd some more about sa-mp sync from it.^^


But there're few arguments in this thread, still.
Quote:

The server runs on a single thread
The server runs on a single thread. This might sound complicated for some people, allow me to explain: All the actions the server does are always after waiting for the latest action to finish.
For example, if you have code that takes 3 seconds to run in OnPlayerConnect (such as the old GeoIP plugin), then the server will wait for that code to finish before doing anything else.

Personally, I don't agree the topic.
It is the code runtime(bytecode?) that runs on a single thread, but data such as network process(player-position, dialog, text, etc) not.
Assume it has a priority list.
Code:
1 - gtasa ingame action(position, aimming, shooting, etc)
2 - sa-mp info(scores, text, dialog, etc)
3 - plugin data
Particularly, sa-mp build-in sqLite and most of mySQL plugins do process while sa-mp code runtime, on the contrary of simple File input/output.

Now we can explain why dialog shows delayed half-seconds when typing a command to show a specfic dialog, and during the short period the player can play as usual.
So I prefer "Your sa-mp code runs on a singlee thread" than "The server runs on a single thread" for this topic.


Quote:

The client is currently paused so the message is put in a pool and will be handled once the player is unpaused and all the messages in the pool before it was handled.

It is the client-server data exchange paused/unpaused.
Reply


Messages In This Thread
Understanding the SA-MP sync - by Slice - 18.10.2010, 07:34
Re: Understanding the SA-MP sync - by Retardedwolf - 18.10.2010, 07:43
Re: Understanding the SA-MP sync - by Slice - 18.10.2010, 07:51
Re: Understanding the SA-MP sync - by Mike_Peterson - 18.10.2010, 07:57
Re: Understanding the SA-MP sync - by Retardedwolf - 18.10.2010, 08:03
Re: Understanding the SA-MP sync - by Slice - 18.10.2010, 08:05
Re: Understanding the SA-MP sync - by Retardedwolf - 18.10.2010, 08:12
Re: Understanding the SA-MP sync - by Hiddos - 18.10.2010, 15:45
Re: Understanding the SA-MP sync - by vyper - 18.10.2010, 15:49
Respuesta: Understanding the SA-MP sync - by The_Moddler - 18.10.2010, 20:25
Re: Understanding the SA-MP sync - by Scenario - 18.10.2010, 20:30
Respuesta: Understanding the SA-MP sync - by MrDeath537 - 18.10.2010, 21:01
Re: Understanding the SA-MP sync - by Calgon - 18.10.2010, 21:43
Respuesta: Re: Understanding the SA-MP sync - by The_Moddler - 18.10.2010, 22:18
Re: Understanding the SA-MP sync - by BP13 - 18.10.2010, 22:19
Re: Understanding the SA-MP sync - by iggy1 - 19.10.2010, 07:41
Re: Understanding the SA-MP sync - by Voldemort - 19.10.2010, 12:09
Re: Understanding the SA-MP sync - by Luka P. - 22.10.2010, 12:34
Re: Understanding the SA-MP sync - by VIRUXE - 24.10.2010, 13:33
Re: Understanding the SA-MP sync - by Slice - 24.10.2010, 14:16
Re: Understanding the SA-MP sync - by DiddyBop - 17.11.2010, 23:12
Re: Understanding the SA-MP sync - by DeadAhead - 09.12.2010, 14:29
Re: Understanding the SA-MP sync - by Slice - 09.12.2010, 14:55
Re: Understanding the SA-MP sync - by SkizzoTrick - 09.12.2010, 15:09
Re: Understanding the SA-MP sync - by ғαιιοцт - 05.01.2011, 09:04
Re: Understanding the SA-MP sync - by HyperZ - 05.01.2011, 09:08
Re: Understanding the SA-MP sync - by leong124 - 05.01.2011, 09:31
Re: Understanding the SA-MP sync - by yezizhu - 31.01.2011, 16:55
Re: Understanding the SA-MP sync - by Slice - 31.01.2011, 20:56
Re: Understanding the SA-MP sync - by yezizhu - 02.02.2011, 03:43
Re: Understanding the SA-MP sync - by Slice - 02.02.2011, 06:38
Re: Understanding the SA-MP sync - by XFlawless - 03.02.2011, 12:44
Re: Understanding the SA-MP sync - by Kerlan - 16.06.2012, 23:59
Re: Understanding the SA-MP sync - by davve95 - 27.07.2012, 19:55
Re: Understanding the SA-MP sync - by RedFusion - 19.04.2013, 10:05
Re: Understanding the SA-MP sync - by Slice - 19.04.2013, 10:53
Re: Understanding the SA-MP sync - by RedFusion - 19.04.2013, 11:21
Re: Understanding the SA-MP sync - by Yashas - 19.04.2013, 15:39
Re: Understanding the SA-MP sync - by DJTunes - 04.07.2013, 05:22
Re: Understanding the SA-MP sync - by RedFusion - 04.07.2013, 10:23
Re: Understanding the SA-MP sync - by Uberanwar - 23.11.2013, 07:46
Re: Understanding the SA-MP sync - by awirer - 10.09.2014, 11:18

Forum Jump:


Users browsing this thread: 1 Guest(s)