Can someone elaborate on this sentence in the documentation about jobs:result:

“Please note that this query can easily cause a deadlock if the asynchronously 
executed query will be queued. “

Referring to this example:

let $query := jobs:eval('(1 to 10000000)[. = 1]', map{}, map{ 'cache': true() })
return (
  jobs:wait($query),
  jobs:result($query)
)

And this about jobs:wait

“If the function is called with the id of a queued job, or repeatedly executed 
job, it may stall and never terminate.”

Can jobs:eval above be queued before jobs:wait is evaluated within the let 
expression?

Kendall

Reply via email to