[quote='756823021, jvigneshcs, /thread/756823, /profile/jvigneshcs']
_timedEvents.value { $0 = newValue }
[/quote]
I'm curious, is there a reason why _timedEvents.value = newValue doesn't work? Never mind, I think I understand now.
Looking at the crash report and at the Swift runtime, it seems that something results in a dangling reference, since it calls fatalError with this description:
swift::fatalError(0,
"Object %p of class %s deallocated with non-zero retain "
"count %zd. This object's deinit, or something called "
"from it, may have created a strong reference to self "
"which outlived deinit, resulting in a dangling "
"reference.\n",
object,
descriptor ? descriptor->Name.get() : "<unknown>",
retainCount);
I think the way you're using nested computed properties somehow results in a dangling reference. Perhaps the object causing this is newValue, though I'm not sure.
Maybe you could reproduce the issue and record the logs with the Console app on Mac to see if you find any other clues?