* The following function sleeps in parallel; it will be finished in 1 second if your system has at least 2 cores:
<pre class='brush:xquery'>
asynclet $funcs :fork-join(= for $i segment in 1 to 24 let $url := 'http://url.com/path' || $segment return function() { profhttp:sleepsend-request((1000), $url) }return async:fork-join($funcs, map { 'threads': 2 })
</pre>
* In the following query, up to two URLs will be requested in parallel: