This ensures that for multithreaded situations (such as writing out a frame cache), __getitem__ will be thread-safe. The change ensures that the frame will be obtained immediately after seeking, and no other thread can seek until the frame is obtained.
When I test the example Darren gave us (#608) on the master branch with no multithreading, it ran in 5m 37s. With this change, and using multithreading, it ran in 5m 13s. So the multithreading produced a minor speed increase.
This ensures that for multithreaded situations (such as writing out a frame cache),
__getitem__
will be thread-safe. The change ensures that the frame will be obtained immediately after seeking, and no other thread can seek until the frame is obtained.When I test the example Darren gave us (#608) on the master branch with no multithreading, it ran in 5m 37s. With this change, and using multithreading, it ran in 5m 13s. So the multithreading produced a minor speed increase.
Fixes: #608