Differences Between: [Versions 401 and 402]
(no description)
File Size: | 76 lines (3 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
lock_utils:: (1 method):
wait_for_lock_with_progress()
Class: lock_utils - X-Ref
Lock utilities.wait_for_lock_with_progress(lock_factory $lockfactory,string $resource,\core\progress\base $progress,int $timeout,string $message = '',int $progressupdatetime = 10,int $maxlifetime = DAYSECS,) X-Ref |
Start a progress bar and attempt to get a lock, updating the bar until a lock is achieved. This will make multiple attempts at getting the lock using a short timeout set by $progressupdatetime. After each failed attempt, it will update the progress bar and try again, until $timeout is reached. param: lock_factory $lockfactory The factory to use to get the lock param: string $resource The resource key we will try to get a lock on param: base $progress The progress bar param: int $timeout The maximum time in seconds to wait for a lock param: string $message Optional message to display on the progress bar param: int $progressupdatetime The number of seconds to wait for each lock attempt before updating the progress bar. param: int $maxlifetime The maxlifetime to set on the lock, if supported. return: lock|false A lock if successful, or false if the timeout expires. |