• Icon: New Feature New Feature
    • Resolution: Fixed
    • Icon: Minor Minor
    • pipeline
    • None

      Groovy defines (Object.)sleep as an alias for Thread.sleep with no checked exceptions, which is nice, but you cannot really use it from a workflow since it just blocks the whole CPS VM thread. Would need to replace it with a Step called sleep that behaves similarly (i.e., timed in milliseconds) but uses an asynchronous callback.

          [JENKINS-26120] Safe sleep step

          Jesse Glick created issue -
          Jesse Glick made changes -
          Link New: This issue depends on JENKINS-25879 [ JENKINS-25879 ]

          Jesse Glick added a comment -

          JENKINS-25879 would make this easier to implement.

          Jesse Glick added a comment - JENKINS-25879 would make this easier to implement.
          Jesse Glick made changes -
          Link New: This issue is related to JENKINS-26513 [ JENKINS-26513 ]
          Jesse Glick made changes -
          Link Original: This issue depends on JENKINS-25879 [ JENKINS-25879 ]

          Jesse Glick added a comment -

          Never mind, this should not be a synchronous step (it is valid to sleep across a restart, and the step should not consume a thread), so JENKINS-25879 is inapplicable.

          Jesse Glick added a comment - Never mind, this should not be a synchronous step (it is valid to sleep across a restart, and the step should not consume a thread), so JENKINS-25879 is inapplicable.

          Jesse Glick added a comment -

          For consistency with the GDK we could use milliseconds as the default, but I think as a practical matter seconds makes a more comfortable default (same as /bin/sleep).

          Jesse Glick added a comment - For consistency with the GDK we could use milliseconds as the default, but I think as a practical matter seconds makes a more comfortable default (same as /bin/sleep ).
          Jesse Glick made changes -
          Remote Link New: This issue links to "PR 60 (Web Link)" [ 12126 ]
          Jesse Glick made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]
          Jesse Glick made changes -
          Link New: This issue depends on JENKINS-27129 [ JENKINS-27129 ]

            jglick Jesse Glick
            jglick Jesse Glick
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: