Hi all,
I've been considering that my objects should subscribe to an event via
a weak reference, however I've found several warnings that this
approach comes with concurrency considerations, like the fact that the
event handler method on the subscriber could be called and be
executing while the object is being garbage collected.
Not being super strong in the multithreaded department, I am having a
hard time coming up with other possibly problematic concurrency
considerations. I realize this question is quite vague, but I am not
even sure where to start educating myself on such topics.
Anyone have any links or literature they can point me to?
thanks,
HC
I've been considering that my objects should subscribe to an event via
a weak reference, however I've found several warnings that this
approach comes with concurrency considerations, like the fact that the
event handler method on the subscriber could be called and be
executing while the object is being garbage collected.
Not being super strong in the multithreaded department, I am having a
hard time coming up with other possibly problematic concurrency
considerations. I realize this question is quite vague, but I am not
even sure where to start educating myself on such topics.
Anyone have any links or literature they can point me to?
thanks,
HC
Comment