C
Christopher
Reading about this design pattern, everything makes sense in the
invoking side of it, but the pattern fails to address the fact that
the event handling side of it occurs on seperate threads. As such, a
mess is created when the handling side needs to access or mutate
anything that the invoking side also wants to access or mutate.
In other words, there has to be synchronization between the invoker
and the handler.
I've tried mutexes, but it has made countless deadlocks and turned my
code into spaghetti.
Is there a pattern that addresses this problem?
invoking side of it, but the pattern fails to address the fact that
the event handling side of it occurs on seperate threads. As such, a
mess is created when the handling side needs to access or mutate
anything that the invoking side also wants to access or mutate.
In other words, there has to be synchronization between the invoker
and the handler.
I've tried mutexes, but it has made countless deadlocks and turned my
code into spaghetti.
Is there a pattern that addresses this problem?