Looking at some source block examples (audio jack, comedi, file source, etc.), sometimes I see a sleep() called inside the work function when there is no data to read, sometimes not (noutputitems = 0).
For a real file, not sleeping and returning noutputitems = 0 makes perfect sense. For a stream device, using fread(), what are the pros/cons of the work loop sleeping if fread is empty, or letting the scheduler decide? If I can influence the implementation of the device driver, similar question on pros/cons if the driver sleeps (or schedules) instead if there is no data yet, or just returns an empty read? (ignore endless looping for these questions, that could be detected) I will be using GR v3.7 when available. Thanks in advance, Tim _______________________________________________ Discuss-gnuradio mailing list [email protected] https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
