Skip to content

Commit

Permalink
async: docs updates for async_sleep()
Browse files Browse the repository at this point in the history
  • Loading branch information
miconda committed Oct 16, 2024
1 parent e18c520 commit cce29af
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions src/modules/async/doc/async_admin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -234,15 +234,21 @@ route[RESUME] {
</title>
<para>
Simulate a sleep of 'seconds' and then continue the processing of SIP
request with the next action. In case of internal errors, the function
returns false.
request with the next action. Note that the processing continues till
the last action in the current route block. Consider using async_route()
instead if you want to control better what is executed after the wait
time. Beacuse the execution is resumed in another process, do not use
private memory variables before and after the async sleep.
</para>
<para>
The sleep parameter represent the number of seconds to suspend the
processing of SIP request. Maximum value is 100. The parameter can be
a static integer or a variable holding an integer.
</para>
<para>
In case of internal errors, the function returns false.
</para>
<para>
This function can be used from REQUEST_ROUTE.
</para>
<example>
Expand All @@ -262,15 +268,13 @@ exit;
<function moreinfo="none">async_ms_sleep(milliseconds)</function>
</title>
<para>
Simulate a sleep of 'milliseconds' and then continue the processing of SIP
request with the next action. In case of internal errors, the function
returns false.
This function works only if the ms_timer parameter has a value greater than 0.
Similar to async_sleep(), but with a 'milliseconds' parameter. This
function works only if the ms_timer parameter has a value greater than 0.
</para>
<para>
The sleep parameter represent the number of milliseconds to suspend the
processing of SIP request. Maximum value is 30000 (30 sec). The parameter can be
a static integer or a variable holding an integer.
processing of SIP request. Maximum value is 30000 (30 sec). The parameter
can be a static integer or a variable holding an integer.
</para>
<para>
This function can be used from REQUEST_ROUTE.
Expand Down

0 comments on commit cce29af

Please sign in to comment.