Add _last_written to Writer, containing the last written frame and eyes
authorCarl Hetherington <cth@carlh.net>
Sat, 18 Apr 2020 18:42:58 +0000 (20:42 +0200)
committerCarl Hetherington <cth@carlh.net>
Sat, 18 Apr 2020 22:57:23 +0000 (00:57 +0200)
commit6e003ef110717dd3e4ecdb009d33671f7834e024
tree575c073e8a06bd20cf9fd5d99aab9db3164e75cd
parentbe4082c68004d56ad7f14b7b9cddef640118dd62
Add _last_written to Writer, containing the last written frame and eyes
to each reel.  This is updated when things are popped off the queue, with
_state_mutex_held, and used in preference to the ones in ReelWriter
which were previously being updated during the time the _state_mutex
lock is unlocked in the body of Writer::thread().  This was not
thread safe (thanks, valgrind!)
src/lib/reel_writer.cc
src/lib/reel_writer.h
src/lib/writer.cc
src/lib/writer.h