|
Boost Users : |
Subject: Re: [Boost-users] signals2 multithreading with dumb pointers
From: Edward Diener (eldiener_at_[hidden])
Date: 2012-06-13 04:30:44
On 6/12/2012 8:00 PM, Chris Stankevitz wrote:
> Hello,
>
> I have a problem that is turning to a big mess. I'm having trouble
> wrapping my brain around it enough to even ask a good question.
>
> Can you recommend techniques/classes/patterns to get me out of this
> mess? Thank you!
>
> 1. I have a "model" whose state changes
>
> 2. State changes are advertised via boost::siganls2. Signals are
> fired at up to 30 Hz.
>
> 2a. I have a lot of signals advertising a lot of different state
> changes. e.g. "employee name changed; employee age changed; etc"
>
> 2b. Signals are fired from different threads
>
> 3. I have a dialog that shows the state of the model.
>
> 4. The dialog connects to the signals and update the screen to reflect
> the changing state of the model.
>
> 4a. (4) is somewhat complicated by the fact that screen updates must
> happen on a particular "main" thread. I have some plumbing to deal
> with this and I believe it is logically safe.
>
> 5. Unfortunately, the dialog class cannot live inside a
> boost::shared_ptr. This is a requirement of wxWidgets.
Stop ! Don't use wxWidgets. It's hopeless doing modern C++ programming
with it.
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net