PluginProbe
Solid Performance – Your No-Code Caching, Performance, & Page Speed Solution / 1.9.0
Solid Performance – Your No-Code Caching, Performance, & Page Speed Solution v1.9.0
2.0.1 trunk 1.0.0 1.1.0 1.2.0 1.3.0 1.3.1 1.3.2 1.3.3 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 1.6.1 1.7.0 1.7.1 1.8.0 1.9.0 2.0.0
solid-performance / src / Performance / Lock / Contracts / Blockable_Lock.php

Blockable_Lock.php in Solid Performance – Your No-Code Caching, Performance, & Page Speed Solution 1.9.0, at src/Performance/Lock/Contracts/Blockable_Lock.php

34 lines 720 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * The Lock contract that allows block acquisition.
4 *
5 * @package SolidWP\Performance
6 */
7
8 declare( strict_types=1 );
9
10 namespace SolidWP\Performance\Lock\Contracts;
11
12 use SolidWP\Performance\Lock\Exceptions\LockTimeoutException;
13
14 /**
15 * The Lock contract that allows block acquisition.
16 *
17 * @internal
18 *
19 * @package SolidWP\Performance
20 */
21 interface Blockable_Lock extends Lock {
22
23 /**
24 * Attempt to acquire the lock for the given number of seconds.
25 *
26 * @param int $seconds How long to wait to acquire the lock before giving up.
27 *
28 * @throws LockTimeoutException If we are unable to acquire the lock within the given seconds.
29 *
30 * @return bool
31 */
32 public function block( int $seconds ): bool;
33 }
34