moonbridge
changeset 289:76bede490cdf
Fixed documentation of moonbridge_io.poll(...)
author | jbe |
---|---|
date | Sun Jun 11 12:53:18 2017 +0200 (2017-06-11) |
parents | 524bb61496b5 |
children | 70f047d32a0f |
files | reference.txt |
line diff
1.1 --- a/reference.txt Sun Jun 11 03:50:28 2017 +0200 1.2 +++ b/reference.txt Sun Jun 11 12:53:18 2017 +0200 1.3 @@ -401,27 +401,20 @@ 1.4 1.5 If the 4th parameter (wakeup_on_sigterm) is set to true, then the function 1.6 returns immediately if the process received at least one SIGTERM signal after 1.7 -moonbridge_io.catch_sigterm() has been called for the first time. 1.8 - 1.9 -The function returns true when at least one file descriptor or handle is ready 1.10 -for reading or writing respectively. The function may also return true (for 1.11 -technical reasons) if signals other than SIGTERM have been received during 1.12 -waiting. 1.13 +moonbridge_io.catch_sigterm() has been called for the first time. Three values 1.14 +are returned if a timeout happened or a SIGTERM has been received: false as 1.15 +first return value, a message string as second return value (that may, for 1.16 +example, be used for assert(...)), and a boolean as third return value which 1.17 +indicates whether the function prematurely returned because of SIGTERM. 1.18 1.19 If the 4th parameter (wakeup_on_sigterm) is omitted or set to false, then the 1.20 function only returns false as first return value if a timeout happened. In 1.21 -this case, the second return value will be set to an appropriate message string 1.22 -such that assert(moonbridge_io.poll(...)) can be used to throw an error. 1.23 +this case, the second return value also will be set to an appropriate message 1.24 +string such that assert(moonbridge_io.poll(...)) can be used to throw an error. 1.25 1.26 -If the 4th parameter (wakeup_on_sigterm) is set to true, then three values are 1.27 -returned if a timeout happened or a SIGTERM has been received: false as first 1.28 -return value, a message string as second return value (that may, for example, 1.29 -be used for assert(...)), and a boolean as third return value which indicates 1.30 -whether the function prematurely returned because of SIGTERM. 1.31 - 1.32 -this case a corresponding message will be provided as second return value such 1.33 -that it is possible to call assert(moonbride_io.poll(...)) to raise an error if 1.34 -a timeout occurs. 1.35 +In all other cases, the function returns true as a single return value. The 1.36 +function may also return true (for technical reasons) if signals other than 1.37 +SIGTERM have been received during waiting. 1.38 1.39 Note that the function is not thread-safe when the 4th parameter is set to 1.40 true.