SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 11/09/2012, 09:30 PM   #1
CoDeZ
Huge Clucker
 
Join Date: Apr 2012
Location: Egypt
Posts: 236
Reputation: 12
Default Threaded and non threaded queries

Can some one please explain what's the difference between threaded and non threaded queries?
I saw on AndreT tutorial it gives more performance but i don't really see the idea...
Can someone explain it please? or atleast try to simplify it?
And please don't post links to wikipedia or something cuz its complex.
CoDeZ is offline   Reply With Quote
Old 12/09/2012, 12:40 PM   #2
CoDeZ
Huge Clucker
 
Join Date: Apr 2012
Location: Egypt
Posts: 236
Reputation: 12
Default Re: Threaded and non threaded queries

Anyone? :/
CoDeZ is offline   Reply With Quote
Old 12/09/2012, 01:00 PM   #3
Vince
Spam Machine
 
Vince's Avatar
 
Join Date: Sep 2007
Location: Belgium
Posts: 10,068
Reputation: 2655
Default Re: Threaded and non threaded queries

The idea with a threaded query is that while the query is busy the sa-mp server can continue on and execute other things (sync!). When the query is done, the MySQL servers calls the function you specify and you can go on loading your data.

With an unthreaded query, the sa-mp server has to wait for the response from the MySQL server before it can continue. This is especially troublesome if the query takes more than a few milliseconds to execute. During this "timeout" nothing happens. No syncing, nothing.
__________________
Vince is offline   Reply With Quote
Old 12/09/2012, 01:17 PM   #4
CoDeZ
Huge Clucker
 
Join Date: Apr 2012
Location: Egypt
Posts: 236
Reputation: 12
Default Re: Threaded and non threaded queries

And R6 Version use unthreaded queries while the new mysql_function_query uses threaded queries?
CoDeZ is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Threaded Queries C0dy09 Scripting Help 3 08/05/2012 01:41 PM
Threaded timers??? Programie Scripting Help 2 23/04/2012 10:26 PM
[Tutorial] Threaded query AppleX Lançamentos/Releases 5 23/01/2012 07:39 PM
SendClientMessage fails to work in some threaded queries. Why? _Outbreak_ Scripting Help 3 30/09/2011 11:44 AM
Threaded queries armyoftwo Help Archive 0 11/12/2010 01:49 PM


All times are GMT. The time now is 09:55 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.