const double Decoder::DecodeThreshold = 0.2;
const int64_t Decoder::DecodeChunkLength = 4096;
+mutex Decoder::_global_decode_mutex;
+
Decoder::Decoder(const srd_decoder *const dec,
std::map<const srd_probe*,
boost::shared_ptr<pv::view::LogicSignal> > probes,
!this_thread::interruption_requested() && i < sample_count;
i += DecodeChunkLength)
{
+ lock_guard<mutex> decode_lock(_global_decode_mutex);
+
const int64_t chunk_end = min(
i + DecodeChunkLength, sample_count);
snapshot->get_samples(chunk, i, chunk_end);
void new_decode_data();
private:
+
+ /**
+ * This mutex prevents more than one decode operation occuring
+ * concurrently.
+ * @todo A proper solution should be implemented to allow multiple
+ * decode operations.
+ */
+ static boost::mutex _global_decode_mutex;
+
const srd_decoder *const _decoder;
std::map<const srd_probe*, boost::shared_ptr<view::LogicSignal> >
_probes;