From d01430e64a8c0c4fad6d97aac8ebe3faabc34d8d Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Thu, 23 Aug 2018 02:14:50 -0700 Subject: [PATCH] ircd::db: Replace default sleep() callback with ctx::sleep(). --- ircd/db.cc | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/ircd/db.cc b/ircd/db.cc index 2d0707d47..0c487adf8 100644 --- a/ircd/db.cc +++ b/ircd/db.cc @@ -2270,12 +2270,16 @@ ircd::db::database::env::SleepForMicroseconds(int micros) noexcept { #ifdef RB_DEBUG_DB_ENV - log.debug("'%s': sleep for %d microseconds", - d.name, - micros); + log::debug + { + "'%s': sleep for %d microseconds", + d.name, + micros + }; #endif - defaults.SleepForMicroseconds(micros); + assert(ctx::current); + ctx::sleep(microseconds(micros)); } void