Boost logo

Boost :

Subject: Re: [boost] Flow-based programming library for Boost?
From: Julian Gonggrijp (j.gonggrijp_at_[hidden])
Date: 2012-12-16 06:39:26


Marcus Tomlinson wrote:

>> - Who owns the buffers? The circuit?
>> - Who are the producers/consumers? The threads?
>>
>> If both of my guesses are correct, am I right to conclude that the
>> threads are rotating over the components, and that the one-slot-per-
>> thread approach to the buffers is the way to ensure that they can read
>> and write concurrently without a need for locking?
>
> Components own the buffers as members, one for incoming signals and one for outgoing signals. You are correct in your conclusion that threads cycle over the components, so as each component is ticked, it consumes from the outgoing buffers of the components connected to it's inputs, then produces into it's own outgoing buffer (and so on). And yes, you are correct, this is designed as such to avoid locking.

Each component has its own input and output buffers. Then how do data
travel from one component's output buffer to another component's input
buffer? In an additional step between the component executions?

-Julian


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk