Quote:
Originally Posted by aleeexxx
you could add the multithread functions recommendation for SQL
|
There are actually no so-called multi-threaded functions.
There are only:
- non-threaded (executed in the same thread as sm plugins, so each query to db cause waiting the response and pausing other plugin's operations during this time).
- threaded (this one executes db queries in other second thread; when you execute one more query in parallel, no more threads created, it queues to the same second thread).
Quote:
Originally Posted by aleeexxx
I until recently knew that the old functions could block the main thread, the new syntax already does it in multithread
correct me if I'm wrong!
|
Not all of them.
Some of
Database methodmap functions still point to the old non-threded functions at the moment.
Example:
Database.SetCharset() - it is just an alias to SQL_SetCharset, see
source code.
There are also some exclusions.
Example:
Database.Escape() - even if according to
source code, it access the db handle, no external query is processed. Instead, client makes escaping itself based on pre-cached codepage of connection.
Most of above info is provided by
Kruzya (
CrazyHackGUT).
Thanks to him.
Additional info can be obtained
in this article (in Russian) by R1KO.
Reading comments would be also useful.
__________________