|
|
|
|
|
by std_throwaway
4154 days ago
|
|
In that case you don't want to sleep. You want to wait until a condition (new data) or a timeout (100ms) occurs. The reasoning is that you don't know how much data will arrive in the next 100ms and if you sleep either a buffer could overrun or something else could block. Therefore you need to flush the buffer either when enough data has accumulated or if a timeout has occured. |
|