mirror of
https://github.com/matrix-construct/construct
synced 2024-11-26 00:32:35 +01:00
ircd::db: Replace default sleep() callback with ctx::sleep().
This commit is contained in:
parent
5239e49f4f
commit
d01430e64a
1 changed files with 8 additions and 4 deletions
10
ircd/db.cc
10
ircd/db.cc
|
@ -2270,12 +2270,16 @@ ircd::db::database::env::SleepForMicroseconds(int micros)
|
||||||
noexcept
|
noexcept
|
||||||
{
|
{
|
||||||
#ifdef RB_DEBUG_DB_ENV
|
#ifdef RB_DEBUG_DB_ENV
|
||||||
log.debug("'%s': sleep for %d microseconds",
|
log::debug
|
||||||
|
{
|
||||||
|
"'%s': sleep for %d microseconds",
|
||||||
d.name,
|
d.name,
|
||||||
micros);
|
micros
|
||||||
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
defaults.SleepForMicroseconds(micros);
|
assert(ctx::current);
|
||||||
|
ctx::sleep(microseconds(micros));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
Loading…
Reference in a new issue