|
Boost : |
Subject: Re: [boost] Flow-based programming library for Boost?
From: Marcus Tomlinson (themarcustomlinson_at_[hidden])
Date: 2012-12-16 04:08:56
> - 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.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk