mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
cleanup: thread_count
move thread_count handling into THD: * increment thread_count in THD constructor * decrement thread_count in THD destructor * never modify thread_count directly!
This commit is contained in:
@ -1906,6 +1906,20 @@ private:
|
||||
inline bool is_conventional() const
|
||||
{ DBUG_ASSERT(0); return Statement::is_conventional(); }
|
||||
|
||||
void dec_thread_count(void)
|
||||
{
|
||||
DBUG_ASSERT(thread_count > 0);
|
||||
thread_safe_decrement32(const_cast<int32*>(&thread_count));
|
||||
signal_thd_deleted();
|
||||
}
|
||||
|
||||
|
||||
void inc_thread_count(void)
|
||||
{
|
||||
thread_safe_increment32(const_cast<int32*>(&thread_count));
|
||||
DBUG_ASSERT(!abort_loop);
|
||||
}
|
||||
|
||||
public:
|
||||
MDL_context mdl_context;
|
||||
|
||||
|
Reference in New Issue
Block a user