Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Proactor

Reply
Thread Tools

Proactor

 
 
Christopher
Guest
Posts: n/a
 
      11-02-2011
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?

 
Reply With Quote
 
 
 
 
Victor Bazarov
Guest
Posts: n/a
 
      11-03-2011
On 11/2/2011 6:35 PM, Christopher wrote:
> 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
--
I do not respond to top-posted replies, please don't ask
 
Reply With Quote
 
 
 
 
Christopher
Guest
Posts: n/a
 
      11-03-2011
On Nov 3, 7:05*am, Victor Bazarov <v.baza...@comcast.invalid> wrote:
> 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.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Difference between synchronous (proactor pattern) and synchronous model in web server Rickert C++ 0 10-06-2011 04:54 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57