MySQL 5.6.14 Source Code Document
|
Go to the source code of this file.
Classes | |
struct | thd_wait_service_st |
Typedefs | |
typedef enum _thd_wait_type_e | thd_wait_type |
Functions | |
void | thd_wait_begin (MYSQL_THD thd, int wait_type) |
void | thd_wait_end (MYSQL_THD thd) |
Variables | |
struct thd_wait_service_st * | thd_wait_service |
This service provides functions for plugins and storage engines to report when they are going to sleep/stall.
SYNOPSIS thd_wait_begin() - call just before a wait begins thd Thread object Use NULL if the thd is NOT known. wait_type Type of wait 1 – short wait (e.g. for mutex) 2 – medium wait (e.g. for disk io) 3 – large wait (e.g. for locked row/table) NOTES This is used by the threadpool to have better knowledge of which threads that currently are actively running on CPUs. When a thread reports that it's going to sleep/stall, the threadpool scheduler is free to start another thread in the pool most likely. The expected wait time is simply an indication of how long the wait is expected to become, the real wait time could be very different.
thd_wait_end() called immediately after the wait is complete
thd_wait_end() MUST be called if thd_wait_begin() was called.
Using thd_wait_...() service is optional but recommended. Using it will improve performance as the thread pool will be more active at managing the thread workload.
Definition in file service_thd_wait.h.
void thd_wait_begin | ( | MYSQL_THD | thd, |
int | wait_type | ||
) |
This is a unit test for the 'meta data locking' classes. It is written to illustrate how we can use Google Test for unit testing of MySQL code. For documentation on Google Test, see http://code.google.com/p/googletest/ and the contained wiki pages GoogleTestPrimer and GoogleTestAdvancedGuide. The code below should hopefully be (mostly) self-explanatory.
Definition at line 40 of file mdl-t.cc.