• 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 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 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 ).

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

              Created:
              Updated:
              Resolved: