Repeatable: Always

Expected Results:
Documentation for LockBackendInterface::wait should say that delay must be given in seconds.

Actual Results:
The documentation of LockBackendInterface::wait says that parameter delay should be given in milliseconds whereas in the implementation in LockBackendAbstract delay is used as if it is passed in seconds.

(line 40 in LockBackendAbstract.php says : "..$delay is passed in seconds,..."

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

klabowterman created an issue. See original summary.

klabowterman’s picture

klabowterman’s picture

Issue summary: View changes
klabowterman’s picture

Status: Active » Needs review
hchonov’s picture

Component: base system » documentation
Status: Needs review » Reviewed & tested by the community

The timeout argument of \Drupal\Core\Lock\LockBackendInterface::acquire() is also given in seconds and the implementation of \Drupal\Core\Lock\LockBackendAbstract::wait() is dealing with the delay parameter as it is given in seconds as well. Therefore the change in the documentation here is correct.

  • catch committed a338aac on 8.5.x
    Issue #2905641 by klabowterman: Wrong unit given in documentation for...

  • catch committed fbf3100 on 8.4.x
    Issue #2905641 by klabowterman: Wrong unit given in documentation for...

catch credited catch.

catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to 8.5.x and cherry-picked to 8.4.x. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.