diff options
author | Eugene Kosov <claprix@yandex.ru> | 2021-03-16 16:09:41 +0300 |
---|---|---|
committer | Eugene Kosov <claprix@yandex.ru> | 2021-03-19 11:44:03 +0300 |
commit | 62e4aaa2407cc880618fb909c349c9c73174f84a (patch) | |
tree | 6fd57b0e99f07dd5d71b8540c417b0f40f9cec45 /storage/innobase/srv/srv0start.cc | |
parent | 40fd42f7f50ce9c85a4b277b3060f865e6852fd5 (diff) | |
download | mariadb-git-62e4aaa2407cc880618fb909c349c9c73174f84a.tar.gz |
cleanup: os_thread_sleep() -> std::this_thread::sleep_for()
std version has an advantage of a more convenient units implementation from
std::chrono. Now it's no need to multipy/divide to bring anything to
micro seconds.
Diffstat (limited to 'storage/innobase/srv/srv0start.cc')
-rw-r--r-- | storage/innobase/srv/srv0start.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/storage/innobase/srv/srv0start.cc b/storage/innobase/srv/srv0start.cc index 120fb4f3ac8..fe6225e9ccb 100644 --- a/storage/innobase/srv/srv0start.cc +++ b/storage/innobase/srv/srv0start.cc @@ -967,7 +967,8 @@ static lsn_t srv_prepare_to_delete_redo_log_file(bool old_exists) count = 0; } - os_thread_sleep(100000); + std::this_thread::sleep_for( + std::chrono::milliseconds(100)); continue; } @@ -1953,7 +1954,7 @@ void innodb_preshutdown() if (trx_sys.is_initialised()) while (trx_sys.any_active_transactions()) - os_thread_sleep(1000); + std::this_thread::sleep_for(std::chrono::milliseconds(1)); } srv_shutdown_bg_undo_sources(); srv_purge_shutdown(); |