Skip to content

Commit

Permalink
Remove ManualEvent trace logging from normal builds. Closes #257.
Browse files Browse the repository at this point in the history
  • Loading branch information
s-ludwig committed Mar 26, 2021
1 parent 1cdcaa1 commit 556f4ad
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions source/vibe/core/sync.d
Original file line number Diff line number Diff line change
Expand Up @@ -1025,15 +1025,15 @@ struct ManualEvent {
shared nothrow @trusted {
import core.atomic : atomicOp, cas;

() @trusted { logTrace("emit shared %s", cast(void*)&this); } ();
debug (VibeMutexLog) () @trusted { logTrace("emit shared %s", cast(void*)&this); } ();

auto ec = atomicOp!"+="(m_emitCount, 1);
auto thisthr = Thread.getThis();

ThreadWaiter lw;
auto drv = eventDriver;
m_waiters.lock.active.filter((ThreadWaiter w) {
() @trusted { logTrace("waiter %s", cast(void*)w); } ();
debug (VibeMutexLog) () @trusted { logTrace("waiter %s", cast(void*)w); } ();
if (w.m_driver is drv) {
lw = w;
lw.addRef();
Expand All @@ -1045,13 +1045,13 @@ struct ManualEvent {
}
return true;
});
() @trusted { logTrace("lw %s", cast(void*)lw); } ();
debug (VibeMutexLog) () @trusted { logTrace("lw %s", cast(void*)lw); } ();
if (lw) {
lw.emit();
releaseWaiter(lw);
}

logTrace("emit shared done");
debug (VibeMutexLog) logTrace("emit shared done");

return ec;
}
Expand Down

0 comments on commit 556f4ad

Please sign in to comment.