mirror of https://github.com/adamdruppe/arsd.git
Call `event.setIfInitialized` if available
This commit is contained in:
parent
cea860a447
commit
2ab06d1249
12
core.d
12
core.d
|
|
@ -9486,8 +9486,14 @@ class LoggerOf(T, size_t bufferSize = 16) : SynchronizableObject {
|
||||||
logger.condition.notifyAll();
|
logger.condition.notifyAll();
|
||||||
}
|
}
|
||||||
// mark us as complete for other listeners waiting as well
|
// mark us as complete for other listeners waiting as well
|
||||||
|
static if (__traits(hasMember, event, "setIfInitialized")) {
|
||||||
|
// Upstream compatibility, see <https://github.com/dlang/dmd/pull/15800>.
|
||||||
|
event.setIfInitialized();
|
||||||
|
} else {
|
||||||
|
// Old D runtime compatibility
|
||||||
event.set();
|
event.set();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
+/
|
+/
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
@ -9537,7 +9543,13 @@ class LoggerOf(T, size_t bufferSize = 16) : SynchronizableObject {
|
||||||
logger.condition.notifyAll();
|
logger.condition.notifyAll();
|
||||||
}
|
}
|
||||||
// mark us as complete for other listeners waiting as well
|
// mark us as complete for other listeners waiting as well
|
||||||
|
static if (__traits(hasMember, event, "setIfInitialized")) {
|
||||||
|
// Upstream compatibility, see <https://github.com/dlang/dmd/pull/15800>.
|
||||||
|
event.setIfInitialized();
|
||||||
|
} else {
|
||||||
|
// Old D runtime compatibility
|
||||||
event.set();
|
event.set();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue