diff options
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/index.html | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/docs/index.html b/docs/index.html index 3bf000a..ede2d21 100644 --- a/docs/index.html +++ b/docs/index.html | |||
| @@ -880,6 +880,23 @@ | |||
| 880 | An error in a finalizer itself overrides the state of the regular chunk (in practise, it would be highly preferable <i>not</i> to have errors in finalizers). If one finalizer errors, the others may not get called. | 880 | An error in a finalizer itself overrides the state of the regular chunk (in practise, it would be highly preferable <i>not</i> to have errors in finalizers). If one finalizer errors, the others may not get called. |
| 881 | </p> | 881 | </p> |
| 882 | 882 | ||
| 883 | <table border="1" bgcolor="#FFFFE0" cellpadding="10" style="width:50%"><tr><td><pre> | ||
| 884 | local lane_body = function() | ||
| 885 | set_finalizer( function( err, stk) | ||
| 886 | if err and type( err) ~= "userdata" then | ||
| 887 | -- no special error: true error | ||
| 888 | print( " error: "..tostring(err)) | ||
| 889 | elseif type( err) == "userdata" then | ||
| 890 | -- lane cancellation is performed by throwing a special userdata as error | ||
| 891 | print( "after cancel") | ||
| 892 | else | ||
| 893 | -- no error: we just got finalized | ||
| 894 | print( "finalized") | ||
| 895 | end | ||
| 896 | end) | ||
| 897 | end | ||
| 898 | </pre></td></tr></table> | ||
| 899 | |||
| 883 | 900 | ||
| 884 | <!-- lindas +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> | 901 | <!-- lindas +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> |
| 885 | <hr/> | 902 | <hr/> |
