System Template
sleep()
Put this instance of the Presentation Engine to sleep for a period
Syntax
void = rb.page.sleep(period)
Parameters
The 'sleep' method takes 1 parameter:
Name | Type/Value | Range/Length | Description | period | number | | Required. Number of seconds to sleep. |
Results
The 'sleep' method returns no useful information.
Remarks A call to this method will cause the presentation engine to suspend
operation for a defined number of seconds. Generally this is not useful behaviour for a web server and definitely
is to be avoided whenever possible because it ties up resource on the
server. It can however be useful in certain critical operations,
or in administrative functions. One example might be attempting to update a critical resource that's currently in use. Rather
than generate an error a pause and retry could be more appropriate. Another example might be a background email job where we wish to pause after the distribution of
each block of emails in order to spread out the load on the server.
Think very carefully before using this method. Putting an Apache/Whitebeam process to sleep
for a period ties up the system resources used by that process. This can cause Apache to have
to start additional server processes, which in an already heavily loaded system can
adverselt impact performance of the entire server..
|