Skip to content

Refactored waiting for cache entry activation

Latest
Compare
Choose a tag to compare
@mmac-m3a mmac-m3a released this 28 May 06:30

The ObjectCache class now has new method wait_for(entry_id) which allows callers to be blocked until the corresponding cache entry becomes active. This is implemented using threading.Event objects. The new method is used in the get_image API method instead of a busy polling (with sleep). New configuration variable ENTRY_WAIT_TIMEOUT allows to configure timeout for maximum time spent waiting for entry activation.