mirror of https://github.com/adamdruppe/arsd.git
Call `event.setIfInitialized` if available
This commit is contained in:
parent
cea860a447
commit
2ab06d1249
16
core.d
16
core.d
|
|
@ -9486,7 +9486,13 @@ class LoggerOf(T, size_t bufferSize = 16) : SynchronizableObject {
|
|||
logger.condition.notifyAll();
|
||||
}
|
||||
// mark us as complete for other listeners waiting as well
|
||||
event.set();
|
||||
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();
|
||||
}
|
||||
}
|
||||
+/
|
||||
|
||||
|
|
@ -9537,7 +9543,13 @@ class LoggerOf(T, size_t bufferSize = 16) : SynchronizableObject {
|
|||
logger.condition.notifyAll();
|
||||
}
|
||||
// mark us as complete for other listeners waiting as well
|
||||
event.set();
|
||||
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();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue