Boost logo

Boost Users :

Subject: Re: [Boost-users] Multithread event handling
From: Matthias Vallentin (vallentin_at_[hidden])
Date: 2010-03-21 14:20:21


On Sat, Mar 20, 2010 at 08:57:35AM +0100, Rutger ter Borg wrote:
> Matthias Vallentin wrote:
> > 2) No structure (e.g., tree-like) on the tasks as in TBB, no
> > priorities.
>
> I've written something quite simple that is also able to do 2), semantics
> are Asio-like,
>
> reference_counter m_counter;
> ios.post( m_counter.wrap( task1 ) );
> ios.post( m_counter.wrap( task2 ) );
> ios.post( m_counter.wrap( task3 ) );
> m_counter.async_wait( all_complete_handler );

How does the task structure look like here? It looks like the tasks
execute concurrently and increment a counter on start/finish -
atomically, as you say. What I mean with structure are for example
hierarchical (e.g., tree-like) groupings of tasks.

I haven't looked at it in detail, but Oliver Kowalke's task and fiber
implementation in the Boost vault look like a good starting point. From
the documentation, it seems there is some support for structuring tasks
via sub-tasks. The libraries support atomic operations via
Boost.Atomic.

   Matthias

-- 
Matthias Vallentin
vallentin_at_[hidden]
http://www.icir.org/matthias

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