30.07.2015, 19:13
What is Threaded Queries?
And What does it do?
How to Do it?
And What does it do?
How to Do it?
Threaded queries are queries that respond quickly which means they are fast, and are used for loading or saving data in MySQL, just like a normal query. Here is a tutorial on how to make a script with MySQL threaded queries.
https://sampforum.blast.hk/showthread.php?tid=574714 |
Threaded queries run on a separate thread in the background. Basically SA-MP server is a single threaded program by default, which means any functions you run have to wait in turn to get executed. What the mysql plugin does is it allows you to run a query on a separate thread, so it means that if your query takes too long it's not going to block the main thread causing it to freeze and lag, instead it will execute the query in the background and then notify that it is done via a callback.
|