Loading TOC...

xdmp:sleep

xdmp:sleep(
   $msec as xs:unsignedInt
) as empty-sequence()

Summary

Delays for a specific amount of time.

Parameters
$msec The amount of time to sleep, in milliseconds.

Example

(: sleep for 1 second :)
xdmp:sleep(1000)
=> ()

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.

Comments

The commenting feature on this page is enabled by a third party. Comments posted to this page are publicly visible.
  • Does xdmp:sleep associated with mark logic session or it works independently?
    • xdmp:sleep() causes the XQuery statement containing the call to pause(). Other requests will continue normally.
  • Does xdmp:sleep allow other tasks a chance to run? or if a task is running and xdmp:sleep is called, does the task continue to block other tasks from running?