- #1
intervoxel
- 195
- 1
Two threads share a common buffer (an image, say). One thread (visualization which has an almost fixed delay). The other, image generation can have a delay either much greater or much lesser than the fixed one. What is the best paradigm to synchronize these threads using pthreads in order to achieve a smooth presentation? The visualization thread has a timer field that must be updated at a good rate, even if the main data be sparsely updated. The generation thread ideally should not be affected at all when running quickly.
Thank you for any help.
Thank you for any help.