Browse Source

async: docs updates for async_sleep()

(cherry picked from commit cce29af41120cf30c4c22979e772d1ca666408c6)
Daniel-Constantin Mierla 11 months ago
parent
commit
ba194c482f
1 changed files with 12 additions and 8 deletions
  1. 12 8
      src/modules/async/doc/async_admin.xml

+ 12 - 8
src/modules/async/doc/async_admin.xml

@@ -234,8 +234,11 @@ 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
@@ -243,6 +246,9 @@ route[RESUME] {
 		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>
@@ -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.