Subject: Re: [boost] [MPI?] which API should i use for this?
From: Yigong Liu (yigongliu_at_[hidden])
Date: 2009-10-09 23:25:27
It really depends on what kind of applications you are writing and what
other libraries your app is built on. If you are writing your apps from
scratch, it will be easier. For example if it is a networking app using
boost.asio, you can easily post events to asio's main threads. You can also
have a look of my join/channel libs (http://channel.sourceforge.net).
However if your app is architectured around other libs such as some GUI
frameworks. Most possibly the app main thread is already taken by the
framework. Better check out the frameworks' threading / synchronization
policy and very possibly it already provide some native api to post an event
to its main thread safely.
On Thu, Oct 8, 2009 at 12:47 PM, Schrader, Glenn <gschrad_at_[hidden]> wrote:
> > -----Original Message-----
> > From: boost-bounces_at_[hidden] [mailto:
> > On Behalf Of David M. Cotter
> > Sent: Wednesday, October 07, 2009 3:19 PM
> > To: boost_at_[hidden]
> > Subject: [boost] [MPI?] which API should i use for this?
> > I have a need to send an "event" to the "main thread's event loop".
> > this may be done from a preemptive thread, a cooperative thread, a
> > timer, or even the main thread itself. i want it to be posted into
> > the event stream and handled in the order that events get processed on
> > the main thread.
> > would i use 'MPI'? or 'interprocess'? or is there a 'thread' way to
> > do this?
> > if it's MPI, what would be the right call?
> > i'm coming from Mac land where i have traditionally used
> > PostEventToQueue()
> Before I start please understand that I don't have any experience
> programming OS X. Even so, PostEventToQueue appears to be part of the OS X
> "carbon" API. There are similar sorts of event posting functions as part of
> the GUI frameworks in both MS Windows and X windows but AFAIK boost doesn't
> directly support any of the sorts of event notifications that are tied into
> the windowing system. However, maybe a combination of the threadpool library
> and/or the signals2 library would fit your needs.
> Unsubscribe & other changes:
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk