Block example that processes on another thread

Can anyone direct me to a block that does its processing on a separate
thread (i.e. other than the thread that calls gr_sync_block::work)

Thanks,

Chris

On Thu, Aug 16, 2007 at 04:04:40PM -0700, Chris S. wrote:

Can anyone direct me to a block that does its processing on a separate
thread (i.e. other than the thread that calls gr_sync_block::work)

Thanks,
Chris

There aren’t any :wink:

Eric

On Aug 18, 2007, at 2:57 PM, Eric B. wrote:

On Thu, Aug 16, 2007 at 04:04:40PM -0700, Chris S. wrote:

Can anyone direct me to a block that does its processing on a
separate
thread (i.e. other than the thread that calls gr_sync_block::work)

There aren’t any :wink:

Not entirely true (just 99% looking at GNU Radio in general)! gr-
audio-osx uses multiple threads, with processing done in both the
scheduler thread as well as the other threads. Data is transferred
via buffering, which requires a mutex to lock processing and
condition to allow for waiting until data is available. Be
forewarned, though, that dealing with common data (variables) in
multiple threads can be difficult! And tracking down bugs is quite
difficult, as per my experience yesterday fixing the use of the mutex
and condition in the OSX modules for audio and USB. - MLD