Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   C++ (http://www.velocityreviews.com/forums/f39-c.html)
-   -   Proactor (http://www.velocityreviews.com/forums/t805467-proactor.html)

Christopher 11-02-2011 10:35 PM

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


Victor Bazarov 11-03-2011 12:05 PM

Re: Proactor
 
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

Christopher 11-03-2011 08:31 PM

Re: Proactor
 
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.


All times are GMT. The time now is 08:20 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.