Proactor

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?
 
V

Victor Bazarov

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?

Seems like your post belongs to 'comp.software.patterns' and
'comp.programming.threads' rather than here.

V
 
C

Christopher

Seems like your post belongs to 'comp.software.patterns' and
'comp.programming.threads' rather than here.

Fair enough. I wasn't aware of a newsgroup specific to patterns.
Bookmark added. Thanks Victor.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,534
Members
45,007
Latest member
OrderFitnessKetoCapsules

Latest Threads

Top