autodoc.git / onepage.xml

version» Context lines:

autodoc.git/onepage.xml:1:   <?xml version='1.0' encoding='utf-8'?> - <manual time-stamp='2018-01-31' version='Pike v8.0.545'> + <manual time-stamp='2018-02-01' version='Pike v8.0.547'>    <dir name='./onepage'>    <file name='./onepage/manual.html'>    <chapter number='1' title='Control Structures'>      <p>In this chapter all the control structures in Pike will be   explained. Control structures are used to control the flow of the   program execution. Note that functions that make the program pause and   simple function calls are not qualified as control structures.</p>      <section number='1' title='Conditions'>
autodoc.git/onepage.xml:22439:   <p> The lock is released when the object is destructed.</p>   </text></doc>   </class>   </class>   <module name='Concurrent'>   <doc><text><p>Module for handling multiple concurrent events.</p>   <p> The <ref resolved='predef::Concurrent.Future'>Future</ref> and <ref resolved='predef::Concurrent.Promise'>Promise</ref> API was inspired by    <url>https://github.com/couchdeveloper/FutureLib</url>.</p>   </text></doc>   <docgroup homogen-name='all' homogen-type='method'><doc><text><p>JavaScript Promise API equivalent of <ref resolved='predef::Concurrent.results'>results()</ref>.</p> - </text><group><seealso/><text><p><ref resolved='predef::Concurrent.results'>results()</ref> + </text><group><seealso/><text><p><ref resolved='predef::Concurrent.results'>results()</ref>, <ref resolved='predef::Concurrent.Promise.depend'>Promise.depend()</ref>    <url>https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Promise</url></p>   </text></group></doc>   <method name='all'><modifiers><local/><variant/></modifiers>   <arguments><argument name='futures'><type><array><valuetype><object resolved='predef::Concurrent.Future'>Future</object></valuetype></array></type></argument></arguments>   <returntype><object resolved='predef::Concurrent.Future'>Future</object></returntype>   </method>   <method name='all'><modifiers><local/><variant/></modifiers>   <arguments><argument name='futures'><type><varargs><object resolved='predef::Concurrent.Future'>Future</object></varargs></type></argument></arguments>   <returntype><object resolved='predef::Concurrent.Future'>Future</object></returntype>   </method>   </docgroup>   <docgroup homogen-name='first_completed' homogen-type='method'><doc><group><returns/><text><p>A <ref resolved='predef::Concurrent.Future'>Future</ref> that represents the first    of the <expr>futures</expr> that completes.</p> - </text></group><group><seealso/><text><p><ref resolved='predef::Concurrent.race'>race()</ref></p> + </text></group><group><seealso/><text><p><ref resolved='predef::Concurrent.race'>race()</ref>, <ref resolved='predef::Concurrent.Promise.first_completed'>Promise.first_completed()</ref></p>   </text></group></doc>   <method name='first_completed'><modifiers><variant/></modifiers>   <arguments><argument name='futures'><type><array><valuetype><object resolved='predef::Concurrent.Future'>Future</object></valuetype></array></type></argument></arguments>   <returntype><object resolved='predef::Concurrent.Future'>Future</object></returntype>   </method>   <method name='first_completed'><modifiers><variant/><local/></modifiers>   <arguments><argument name='futures'><type><varargs><object resolved='predef::Concurrent.Future'>Future</object></varargs></type></argument></arguments>   <returntype><object resolved='predef::Concurrent.Future'>Future</object></returntype>   </method>   </docgroup>
autodoc.git/onepage.xml:22495:   <method name='on_failure'>   <arguments><argument name='f'><type><function><argtype><mixed/></argtype><returntype><void/></returntype></function></type></argument></arguments>   <returntype><void/></returntype>   </method>   <variable name='global_on_failure'><modifiers><protected/></modifiers><type><function><argtype><mixed/></argtype><returntype><void/></returntype></function></type></variable>   </docgroup>   <docgroup homogen-name='' homogen-type='import'>   <import name=''><classname resolved='predef::'>predef::</classname></import>   </docgroup>   <docgroup homogen-name='race' homogen-type='method'><doc><text><p>JavaScript Promise API equivalent of <ref resolved='predef::Concurrent.first_completed'>first_completed()</ref>.</p> - </text><group><seealso/><text><p><ref resolved='predef::Concurrent.first_completed'>first_completed()</ref> + </text><group><seealso/><text><p><ref resolved='predef::Concurrent.first_completed'>first_completed()</ref>, <ref resolved='predef::Concurrent.Promise.first_completed'>Promise.first_completed()</ref>    <url>https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Promise</url></p>   </text></group></doc>   <method name='race'><modifiers><variant/><local/></modifiers>   <arguments><argument name='futures'><type><array><valuetype><object resolved='predef::Concurrent.Future'>Future</object></valuetype></array></type></argument></arguments>   <returntype><object resolved='predef::Concurrent.Future'>Future</object></returntype>   </method>   <method name='race'><modifiers><variant/><local/></modifiers>   <arguments><argument name='futures'><type><varargs><object resolved='predef::Concurrent.Future'>Future</object></varargs></type></argument></arguments>   <returntype><object resolved='predef::Concurrent.Future'>Future</object></returntype>   </method>
autodoc.git/onepage.xml:22529:   </text></group><group><note/><text><p>This function can be used to ensure values are futures.</p>   </text></group><group><seealso/><text><p><ref resolved='predef::Concurrent.Future.on_success'>Future.on_success()</ref>, <ref resolved='predef::Concurrent.Promise.success'>Promise.success()</ref>    <url>https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Promise</url></p>   </text></group></doc>   <method name='resolve'>   <arguments><argument name='value'><type><mixed/></type></argument></arguments>   <returntype><object resolved='predef::Concurrent.Future'>Future</object></returntype>   </method>   </docgroup>   <docgroup homogen-name='results' homogen-type='method'><doc><group><returns/><text><p>A <ref resolved='predef::Concurrent.Future'>Future</ref> that represents the array of all the completed <expr>futures</expr>.</p> - </text></group><group><seealso/><text><p><ref resolved='predef::Concurrent.all'>all()</ref></p> + </text></group><group><seealso/><text><p><ref resolved='predef::Concurrent.all'>all()</ref>, <ref resolved='predef::Concurrent.Promise.depend'>Promise.depend()</ref></p>   </text></group></doc>   <method name='results'><modifiers><variant/></modifiers>   <arguments><argument name='futures'><type><array><valuetype><object resolved='predef::Concurrent.Future'>Future</object></valuetype></array></type></argument></arguments>   <returntype><object resolved='predef::Concurrent.Future'>Future</object></returntype>   </method>   <method name='results'><modifiers><local/><variant/></modifiers>   <arguments><argument name='futures'><type><varargs><object resolved='predef::Concurrent.Future'>Future</object></varargs></type></argument></arguments>   <returntype><object resolved='predef::Concurrent.Future'>Future</object></returntype>   </method>   </docgroup>   <docgroup homogen-name='traverse' homogen-type='method'><doc><text><p>Return a <ref resolved='predef::Concurrent.Future'>Future</ref> that represents the array of mapping <ref resolved='predef::Concurrent.traverse.fun'>fun</ref>    over the results of the completed <ref resolved='predef::Concurrent.traverse.futures'>futures</ref>.</p>   </text></doc>   <method name='traverse'>   <arguments><argument name='futures'><type><array><valuetype><object resolved='predef::Concurrent.Future'>Future</object></valuetype></array></type></argument><argument name='fun'><type><function><argtype><mixed/></argtype><argtype><varargs><mixed/></varargs></argtype><returntype><mixed/></returntype></function></type></argument><argument name='extra'><type><varargs><mixed/></varargs></type></argument></arguments>   <returntype><object resolved='predef::Concurrent.Future'>Future</object></returntype>   </method>   </docgroup> -  + <docgroup homogen-name='use_backend' homogen-type='method'><doc><group><param name='enable'/><text><p>Setting this to <expr>false</expr> causes all <ref resolved='predef::Concurrent'>Concurrent</ref> callbacks +  (except for timeouts) +  to be called directly, without using a backend.</p> + </text></group><group><note/><text><p>As long as the backend hasn't started, it will default to <expr>false</expr>. +  Upon startup of the backend, it will change to <expr>true</expr> unless you +  explicitly called <ref resolved='predef::Concurrent.use_backend'>use_backend()</ref> before that.</p> + </text></group><group><note/><text><p>(Un)setting this typically alters the order in which some callbacks +  are called (depending on what happens in a callback).</p> + </text></group></doc> + <method name='use_backend'><modifiers><final/></modifiers> + <arguments><argument name='enable'><type><int/></type></argument></arguments> + <returntype><void/></returntype> + </method> + </docgroup>   <class name='Future'>   <doc><text><p>Value that will be provided asynchronously    sometime in the future.</p>   </text><group><seealso/><text><p><ref resolved='predef::Concurrent.Promise'>Promise</ref></p>   </text></group></doc>   <docgroup homogen-name='apply' homogen-type='method'><doc><text><p>Apply <ref resolved='predef::Concurrent.Future.apply.fun'>fun</ref> with <ref resolved='predef::Concurrent.Future.apply.val'>val</ref> followed by the contents of <ref resolved='predef::Concurrent.Future.apply.ctx'>ctx</ref>,    and update <ref resolved='predef::Concurrent.Future.apply.p'>p</ref> with the result.</p>   </text></doc>   <method name='apply'><modifiers><protected/></modifiers>   <arguments><argument name='val'><type><mixed/></type></argument><argument name='p'><type><object resolved='predef::Concurrent.Promise'>Promise</object></type></argument><argument name='fun'><type><function><argtype><mixed/></argtype><argtype><varargs><mixed/></varargs></argtype><returntype><mixed/></returntype></function></type></argument><argument name='ctx'><type><array><valuetype><mixed/></valuetype></array></type></argument></arguments>   <returntype><void/></returntype>   </method>   </docgroup>   <docgroup homogen-name='apply_filter' homogen-type='method'><doc><text><p>Apply <ref resolved='predef::Concurrent.Future.apply_filter.fun'>fun</ref> with <ref resolved='predef::Concurrent.Future.apply_filter.val'>val</ref> followed by the contents of <ref resolved='predef::Concurrent.Future.apply_filter.ctx'>ctx</ref>,    and update <ref resolved='predef::Concurrent.Future.apply_filter.p'>p</ref> with <ref resolved='predef::Concurrent.Future.apply_filter.val'>val</ref> if <ref resolved='predef::Concurrent.Future.apply_filter.fun'>fun</ref> didn't return false. -  If <ref resolved='predef::Concurrent.Future.apply_filter.fun'>fun</ref> returned false fail <ref resolved='predef::Concurrent.Future.apply_filter.p'>p</ref> with <ref resolved='predef::.UNDEFINED'>UNDEFINED</ref>.</p> +  If <ref resolved='predef::Concurrent.Future.apply_filter.fun'>fun</ref> returned false, fail <ref resolved='predef::Concurrent.Future.apply_filter.p'>p</ref> with <expr>0</expr> as result.</p>   </text></doc>   <method name='apply_filter'><modifiers><protected/></modifiers>   <arguments><argument name='val'><type><mixed/></type></argument><argument name='p'><type><object resolved='predef::Concurrent.Promise'>Promise</object></type></argument><argument name='fun'><type><function><argtype><mixed/></argtype><argtype><varargs><mixed/></varargs></argtype><returntype><int><min>0</min><max>1</max></int></returntype></function></type></argument><argument name='ctx'><type><array><valuetype><mixed/></valuetype></array></type></argument></arguments>   <returntype><void/></returntype>   </method>   </docgroup>   <docgroup homogen-name='apply_flat' homogen-type='method'><doc><text><p>Apply <ref resolved='predef::Concurrent.Future.apply_flat.fun'>fun</ref> with <ref resolved='predef::Concurrent.Future.apply_flat.val'>val</ref> followed by the contents of <ref resolved='predef::Concurrent.Future.apply_flat.ctx'>ctx</ref>,    and update <ref resolved='predef::Concurrent.Future.apply_flat.p'>p</ref> with the eventual result.</p>   </text></doc>   <method name='apply_flat'><modifiers><protected/></modifiers>
autodoc.git/onepage.xml:22586:   </method>   </docgroup>   <docgroup homogen-name='apply_smart' homogen-type='method'><doc><text><p>Apply <ref resolved='predef::Concurrent.Future.apply_smart.fun'>fun</ref> with <ref resolved='predef::Concurrent.Future.apply_smart.val'>val</ref> followed by the contents of <ref resolved='predef::Concurrent.Future.apply_smart.ctx'>ctx</ref>,    and update <ref resolved='predef::Concurrent.Future.apply_smart.p'>p</ref> with the eventual result.</p>   </text></doc>   <method name='apply_smart'><modifiers><protected/></modifiers>   <arguments><argument name='val'><type><mixed/></type></argument><argument name='p'><type><object resolved='predef::Concurrent.Promise'>Promise</object></type></argument><argument name='fun'><type><function><argtype><mixed/></argtype><argtype><varargs><mixed/></varargs></argtype><returntype><or><mixed/><object resolved='predef::Concurrent.Future'>Future</object></or></returntype></function></type></argument><argument name='ctx'><type><array><valuetype><mixed/></valuetype></array></type></argument></arguments>   <returntype><void/></returntype>   </method>   </docgroup> - <docgroup homogen-name='filter' homogen-type='method'><doc><text><p>Return a <ref resolved='predef::Concurrent.Future'>Future</ref> that either will by fulfilled by the -  fulfilled result of this <ref resolved='predef::Concurrent.Future'>Future</ref> if applying <ref resolved='predef::Concurrent.Future.filter.fun'>fun</ref> -  with the result followed by <ref resolved='predef::Concurrent.Future.filter.extra'>extra</ref> returns true, -  or will fail with <ref resolved='predef::.UNDEFINED'>UNDEFINED</ref> if it returns false.</p> - </text></doc> + <docgroup homogen-name='filter' homogen-type='method'><doc><text><p>This specifies a callback that is only called on success, and +  allows you to selectively alter the future into a failure.</p> + </text><group><param name='fun'/><text><p>Function to be called. The first argument will be the +  <b>success</b> result of <b>this</b> <ref resolved='predef::Concurrent.Future'>Future</ref>. +  If the return value is <expr>true</expr>, the future succeeds with +  the original success result. +  If the return value is <expr>false</expr>, the future fails with +  an <ref resolved='predef::.UNDEFINED'>UNDEFINED</ref> result.</p> + </text></group><group><param name='extra'/><text><p>Any extra context needed for +  <expr>fun</expr>. They will be provided +  as arguments two and onwards when the callback is called.</p> + </text></group><group><returns/><text><p>The new <ref resolved='predef::Concurrent.Future'>Future</ref>.</p> + </text></group><group><seealso/><text><p><ref resolved='predef::Concurrent.Future.transform'>transform()</ref></p> + </text></group></doc>   <method name='filter'>   <arguments><argument name='fun'><type><function><argtype><mixed/></argtype><argtype><varargs><mixed/></varargs></argtype><returntype><int><min>0</min><max>1</max></int></returntype></function></type></argument><argument name='extra'><type><varargs><mixed/></varargs></type></argument></arguments>   <returntype><object resolved='predef::Concurrent.Future'>this_program</object></returntype>   </method>   </docgroup> - <docgroup homogen-name='flat_map' homogen-type='method'><doc><text><p>Return a <ref resolved='predef::Concurrent.Future'>Future</ref> that will be fulfilled with the fulfilled result -  of applying <ref resolved='predef::Concurrent.Future.flat_map.fun'>fun</ref> with the fulfilled result of this <ref resolved='predef::Concurrent.Future'>Future</ref> -  followed by <ref resolved='predef::Concurrent.Future.flat_map.extra'>extra</ref>.</p> - </text><group><note/><text><p>This method is used if your <ref resolved='predef::Concurrent.Future.flat_map.fun'>fun</ref> returns a <ref resolved='predef::Concurrent.Future'>Future</ref> again.</p> - </text></group><group><seealso/><text><p><ref resolved='predef::Concurrent.Future.map'>map()</ref>, <ref resolved='predef::Concurrent.Future.transform_with'>transform_with()</ref>, <ref resolved='predef::Concurrent.Future.recover_with'>recover_with()</ref></p> + <docgroup homogen-name='flat_map' homogen-type='method'><doc><text><p>This is an alias for <ref resolved='predef::Concurrent.Future.map_with'>map_with()</ref>.</p> + </text><group><seealso/><text><p><ref resolved='predef::Concurrent.Future.map_with'>map_with()</ref></p>   </text></group></doc> - <method name='flat_map'> + <method name='flat_map'><modifiers><local/></modifiers>   <arguments><argument name='fun'><type><function><argtype><mixed/></argtype><argtype><varargs><mixed/></varargs></argtype><returntype><object resolved='predef::Concurrent.Future'>this_program</object></returntype></function></type></argument><argument name='extra'><type><varargs><mixed/></varargs></type></argument></arguments>   <returntype><object resolved='predef::Concurrent.Future'>this_program</object></returntype>   </method>   </docgroup>   <docgroup homogen-name='get' homogen-type='method'><doc><text><p>Wait for fulfillment and return the value.</p>   </text><group><throws/><text><p>Throws on rejection.</p>   </text></group></doc>   <method name='get'>   <arguments/>   <returntype><mixed/></returntype>   </method>   </docgroup> - <docgroup homogen-name='map' homogen-type='method'><doc><text><p>Return a <ref resolved='predef::Concurrent.Future'>Future</ref> that will be fulfilled with the result -  of applying <ref resolved='predef::Concurrent.Future.map.fun'>fun</ref> with the fulfilled result of this <ref resolved='predef::Concurrent.Future'>Future</ref> -  followed by <ref resolved='predef::Concurrent.Future.map.extra'>extra</ref>.</p> - </text><group><note/><text><p>This method is used if your <ref resolved='predef::Concurrent.Future.map.fun'>fun</ref> returns a regular value (i.e. + <docgroup homogen-name='map' homogen-type='method'><doc><text><p>This specifies a callback that is only called on success, and +  allows you to alter the future.</p> + </text><group><param name='fun'/><text><p>Function to be called. The first argument will be the +  <b>success</b> result of <b>this</b> <ref resolved='predef::Concurrent.Future'>Future</ref>. +  The return value will be the success result of the new <ref resolved='predef::Concurrent.Future'>Future</ref>.</p> + </text></group><group><param name='extra'/><text><p>Any extra context needed for +  <expr>fun</expr>. They will be provided +  as arguments two and onwards when the callback is called.</p> + </text></group><group><returns/><text><p>The new <ref resolved='predef::Concurrent.Future'>Future</ref>.</p> + </text></group><group><note/><text><p>This method is used if your <ref resolved='predef::Concurrent.Future.map.fun'>fun</ref> returns a regular value (i.e.    <b>not</b> a <ref resolved='predef::Concurrent.Future'>Future</ref>).</p> - </text></group><group><seealso/><text><p><ref resolved='predef::Concurrent.Future.flat_map'>flat_map()</ref>, <ref resolved='predef::Concurrent.Future.transform'>transform()</ref>, <ref resolved='predef::Concurrent.Future.recover'>recover()</ref></p> + </text></group><group><seealso/><text><p><ref resolved='predef::Concurrent.Future.map_with'>map_with()</ref>, <ref resolved='predef::Concurrent.Future.transform'>transform()</ref>, <ref resolved='predef::Concurrent.Future.recover'>recover()</ref></p>   </text></group></doc>   <method name='map'>   <arguments><argument name='fun'><type><function><argtype><mixed/></argtype><argtype><varargs><mixed/></varargs></argtype><returntype><mixed/></returntype></function></type></argument><argument name='extra'><type><varargs><mixed/></varargs></type></argument></arguments>   <returntype><object resolved='predef::Concurrent.Future'>this_program</object></returntype>   </method>   </docgroup> -  + <docgroup homogen-name='map_with' homogen-type='method'><doc><text><p>This specifies a callback that is only called on success, and +  allows you to alter the future.</p> + </text><group><param name='fun'/><text><p>Function to be called. The first argument will be the +  <b>success</b> result of <b>this</b> <ref resolved='predef::Concurrent.Future'>Future</ref>. +  The return value must be a <ref resolved='predef::Concurrent.Future'>Future</ref> that promises +  the new result.</p> + </text></group><group><param name='extra'/><text><p>Any extra context needed for +  <expr>fun</expr>. They will be provided +  as arguments two and onwards when the callback is called.</p> + </text></group><group><returns/><text><p>The new <ref resolved='predef::Concurrent.Future'>Future</ref>.</p> + </text></group><group><note/><text><p>This method is used if your <ref resolved='predef::Concurrent.Future.map_with.fun'>fun</ref> returns a <ref resolved='predef::Concurrent.Future'>Future</ref> again.</p> + </text></group><group><seealso/><text><p><ref resolved='predef::Concurrent.Future.map'>map()</ref>, <ref resolved='predef::Concurrent.Future.transform_with'>transform_with()</ref>, <ref resolved='predef::Concurrent.Future.recover_with'>recover_with()</ref>, <ref resolved='predef::Concurrent.Future.flat_map'>flat_map</ref></p> + </text></group></doc> + <method name='map_with'> + <arguments><argument name='fun'><type><function><argtype><mixed/></argtype><argtype><varargs><mixed/></varargs></argtype><returntype><object resolved='predef::Concurrent.Future'>this_program</object></returntype></function></type></argument><argument name='extra'><type><varargs><mixed/></varargs></type></argument></arguments> + <returntype><object resolved='predef::Concurrent.Future'>this_program</object></returntype> + </method> + </docgroup>   <docgroup homogen-name='on_failure' homogen-type='method'><doc><text><p>Register a callback that is to be called on failure.</p>   </text><group><param name='cb'/><text><p>Function to be called. The first argument will be the    failure result of the <ref resolved='predef::Concurrent.Future'>Future</ref>.</p>   </text></group><group><param name='extra'/><text><p>Any extra context needed for <ref resolved='predef::Concurrent.Future.on_failure.cb'>cb</ref>. They will be provided    as arguments two and onwards when <ref resolved='predef::Concurrent.Future.on_failure.cb'>cb</ref> is called.</p>   </text></group><group><note/><text><p><ref resolved='predef::Concurrent.Future.on_failure.cb'>cb</ref> will always be called from the main backend.</p>   </text></group><group><seealso/><text><p><ref resolved='predef::Concurrent.Future.on_success'>on_success()</ref></p>   </text></group></doc>   <method name='on_failure'>   <arguments><argument name='cb'><type><function><argtype><mixed/></argtype><argtype><varargs><mixed/></varargs></argtype><returntype><void/></returntype></function></type></argument><argument name='extra'><type><varargs><mixed/></varargs></type></argument></arguments>
autodoc.git/onepage.xml:22653:   </text></group><group><param name='extra'/><text><p>Any extra context needed for <ref resolved='predef::Concurrent.Future.on_success.cb'>cb</ref>. They will be provided    as arguments two and onwards when <ref resolved='predef::Concurrent.Future.on_success.cb'>cb</ref> is called.</p>   </text></group><group><note/><text><p><ref resolved='predef::Concurrent.Future.on_success.cb'>cb</ref> will always be called from the main backend.</p>   </text></group><group><seealso/><text><p><ref resolved='predef::Concurrent.Future.on_failure'>on_failure()</ref></p>   </text></group></doc>   <method name='on_success'>   <arguments><argument name='cb'><type><function><argtype><mixed/></argtype><argtype><varargs><mixed/></varargs></argtype><returntype><void/></returntype></function></type></argument><argument name='extra'><type><varargs><mixed/></varargs></type></argument></arguments>   <returntype><object resolved='predef::Concurrent.Future'>this_program</object></returntype>   </method>   </docgroup> - <docgroup homogen-name='recover' homogen-type='method'><doc><text><p>Return a <ref resolved='predef::Concurrent.Future'>Future</ref> that will be fulfilled with either -  the fulfilled result of this <ref resolved='predef::Concurrent.Future'>Future</ref>, or the result -  of applying <ref resolved='predef::Concurrent.Future.recover.fun'>fun</ref> with the failed result followed -  by <ref resolved='predef::Concurrent.Future.recover.extra'>extra</ref>.</p> - </text><group><note/><text><p>This method is used if your callbacks returns a regular value (i.e. + <docgroup homogen-name='recover' homogen-type='method'><doc><text><p>This specifies a callback that is only called on failure, and +  allows you to alter the future into a success.</p> + </text><group><param name='fun'/><text><p>Function to be called. The first argument will be the +  <b>failure</b> result of <b>this</b> <ref resolved='predef::Concurrent.Future'>Future</ref>. +  The return value will be the success result of the new <ref resolved='predef::Concurrent.Future'>Future</ref>.</p> + </text></group><group><param name='extra'/><text><p>Any extra context needed for +  <expr>fun</expr>. They will be provided +  as arguments two and onwards when the callback is called.</p> + </text></group><group><returns/><text><p>The new <ref resolved='predef::Concurrent.Future'>Future</ref>.</p> + </text></group><group><note/><text><p>This method is used if your callbacks return a regular value (i.e.    <b>not</b> a <ref resolved='predef::Concurrent.Future'>Future</ref>).</p>   </text></group><group><seealso/><text><p><ref resolved='predef::Concurrent.Future.recover_with'>recover_with()</ref>, <ref resolved='predef::Concurrent.Future.map'>map()</ref>, <ref resolved='predef::Concurrent.Future.transform'>transform()</ref></p>   </text></group></doc>   <method name='recover'>   <arguments><argument name='fun'><type><function><argtype><mixed/></argtype><argtype><varargs><mixed/></varargs></argtype><returntype><mixed/></returntype></function></type></argument><argument name='extra'><type><varargs><mixed/></varargs></type></argument></arguments>   <returntype><object resolved='predef::Concurrent.Future'>this_program</object></returntype>   </method>   </docgroup> - <docgroup homogen-name='recover_with' homogen-type='method'><doc><text><p>Return a <ref resolved='predef::Concurrent.Future'>Future</ref> that will be fulfilled with either -  the fulfilled result of this <ref resolved='predef::Concurrent.Future'>Future</ref>, or the fulfilled result -  of applying <ref resolved='predef::Concurrent.Future.recover_with.fun'>fun</ref> with the failed result followed -  by <ref resolved='predef::Concurrent.Future.recover_with.extra'>extra</ref>.</p> - </text><group><note/><text><p>This method is used if your callbacks returns a <ref resolved='predef::Concurrent.Future'>Future</ref> again.</p> - </text></group><group><seealso/><text><p><ref resolved='predef::Concurrent.Future.recover'>recover()</ref>, <ref resolved='predef::Concurrent.Future.flat_map'>flat_map()</ref>, <ref resolved='predef::Concurrent.Future.transform_with'>transform_with()</ref></p> + <docgroup homogen-name='recover_with' homogen-type='method'><doc><text><p>This specifies a callback that is only called on failure, and +  allows you to alter the future into a success.</p> + </text><group><param name='fun'/><text><p>Function to be called. The first argument will be the +  <b>failure</b> result of <b>this</b> <ref resolved='predef::Concurrent.Future'>Future</ref>. +  The return value must be a <ref resolved='predef::Concurrent.Future'>Future</ref> that promises +  the new success result.</p> + </text></group><group><param name='extra'/><text><p>Any extra context needed for +  <expr>fun</expr>. They will be provided +  as arguments two and onwards when the callback is called.</p> + </text></group><group><returns/><text><p>The new <ref resolved='predef::Concurrent.Future'>Future</ref>.</p> + </text></group><group><note/><text><p>This method is used if your callbacks return a <ref resolved='predef::Concurrent.Future'>Future</ref> again.</p> + </text></group><group><seealso/><text><p><ref resolved='predef::Concurrent.Future.recover'>recover()</ref>, <ref resolved='predef::Concurrent.Future.map_with'>map_with()</ref>, <ref resolved='predef::Concurrent.Future.transform_with'>transform_with()</ref></p>   </text></group></doc>   <method name='recover_with'>   <arguments><argument name='fun'><type><function><argtype><mixed/></argtype><argtype><varargs><mixed/></varargs></argtype><returntype><object resolved='predef::Concurrent.Future'>this_program</object></returntype></function></type></argument><argument name='extra'><type><varargs><mixed/></varargs></type></argument></arguments>   <returntype><object resolved='predef::Concurrent.Future'>this_program</object></returntype>   </method>   </docgroup>   <docgroup homogen-name='then' homogen-type='method'><doc><text><p>JavaScript Promise API close but not identical equivalent    of a combined <ref resolved='predef::Concurrent.Future.transform'>transform()</ref> and <ref resolved='predef::Concurrent.Future.transform_with'>transform_with()</ref>.</p>   </text><group><param name='onfulfilled'/><text><p>Function to be called on fulfillment. The first argument will be the    result of <b>this</b> <ref resolved='predef::Concurrent.Future'>Future</ref>.
autodoc.git/onepage.xml:22729:   </method>   </docgroup>   <docgroup homogen-name='timeout' homogen-type='method'><doc><text><p>Return a <ref resolved='predef::Concurrent.Future'>Future</ref> that will either be fulfilled with the fulfilled    result of this <ref resolved='predef::Concurrent.Future'>Future</ref>, or be failed after <ref resolved='predef::Concurrent.Future.timeout.seconds'>seconds</ref> have expired.</p>   </text></doc>   <method name='timeout'>   <arguments><argument name='seconds'><type><or><int/><float/></or></type></argument></arguments>   <returntype><object resolved='predef::Concurrent.Future'>this_program</object></returntype>   </method>   </docgroup> - <docgroup homogen-name='transform' homogen-type='method'><doc><text><p>Return a <ref resolved='predef::Concurrent.Future'>Future</ref> that will be fulfilled with either -  the result of applying <ref resolved='predef::Concurrent.Future.transform.success'>success</ref> with the fulfilled result -  followed by <ref resolved='predef::Concurrent.Future.transform.extra'>extra</ref>, or the result of applying <ref resolved='predef::Concurrent.Future.transform.failure'>failure</ref> -  with the failed result followed by <ref resolved='predef::Concurrent.Future.transform.extra'>extra</ref>.</p> - <p> <ref resolved='predef::Concurrent.Future.transform.failure'>failure</ref> defaults to <ref resolved='predef::Concurrent.Future.transform.success'>success</ref>.</p> - </text><group><note/><text><p>This method is used if your callbacks returns a regular value (i.e. + <docgroup homogen-name='transform' homogen-type='method'><doc><text><p>This specifies callbacks that allow you to alter the future.</p> + </text><group><param name='success'/><text><p>Function to be called. The first argument will be the +  <b>success</b> result of <b>this</b> <ref resolved='predef::Concurrent.Future'>Future</ref>. +  The return value will be the success result of the new <ref resolved='predef::Concurrent.Future'>Future</ref>.</p> + </text></group><group><param name='failure'/><text><p>Function to be called. The first argument will be the +  <b>failure</b> result of <b>this</b> <ref resolved='predef::Concurrent.Future'>Future</ref>. +  The return value will be the success result of the new <ref resolved='predef::Concurrent.Future'>Future</ref>. +  If this callback is omitted, it will default to the same callback as +  <expr>success</expr>.</p> + </text></group><group><param name='extra'/><text><p>Any extra context needed for +  <expr>success</expr> and <expr>failure</expr>. They will be provided +  as arguments two and onwards when the callbacks are called.</p> + </text></group><group><returns/><text><p>The new <ref resolved='predef::Concurrent.Future'>Future</ref>.</p> + </text></group><group><note/><text><p>This method is used if your callbacks return a regular value (i.e.    <b>not</b> a <ref resolved='predef::Concurrent.Future'>Future</ref>).</p>   </text></group><group><seealso/><text><p><ref resolved='predef::Concurrent.Future.transform_with'>transform_with()</ref>, <ref resolved='predef::Concurrent.Future.map'>map()</ref>, <ref resolved='predef::Concurrent.Future.recover'>recover()</ref></p>   </text></group></doc>   <method name='transform'>   <arguments><argument name='success'><type><function><argtype><mixed/></argtype><argtype><varargs><mixed/></varargs></argtype><returntype><mixed/></returntype></function></type></argument><argument name='failure'><type><or><function><argtype><mixed/></argtype><argtype><varargs><mixed/></varargs></argtype><returntype><mixed/></returntype></function><void/></or></type></argument><argument name='extra'><type><varargs><mixed/></varargs></type></argument></arguments>   <returntype><object resolved='predef::Concurrent.Future'>this_program</object></returntype>   </method>   </docgroup> - <docgroup homogen-name='transform_with' homogen-type='method'><doc><text><p>Return a <ref resolved='predef::Concurrent.Future'>Future</ref> that will be fulfilled with either -  the fulfilled result of applying <ref resolved='predef::Concurrent.Future.transform_with.success'>success</ref> with the fulfilled result -  followed by <ref resolved='predef::Concurrent.Future.transform_with.extra'>extra</ref>, or the fulfilled result of applying <ref resolved='predef::Concurrent.Future.transform_with.failure'>failure</ref> -  with the failed result followed by <ref resolved='predef::Concurrent.Future.transform_with.extra'>extra</ref>.</p> - <p> <ref resolved='predef::Concurrent.Future.transform_with.failure'>failure</ref> defaults to <ref resolved='predef::Concurrent.Future.transform_with.success'>success</ref>.</p> - </text><group><note/><text><p>This method is used if your callbacks returns a <ref resolved='predef::Concurrent.Future'>Future</ref> again.</p> - </text></group><group><seealso/><text><p><ref resolved='predef::Concurrent.Future.transform'>transform()</ref>, <ref resolved='predef::Concurrent.Future.flat_map'>flat_map()</ref>, <ref resolved='predef::Concurrent.Future.recover_with'>recover_with</ref></p> + <docgroup homogen-name='transform_with' homogen-type='method'><doc><text><p>This specifies callbacks that allow you to alter the future.</p> + </text><group><param name='success'/><text><p>Function to be called. The first argument will be the +  <b>success</b> result of <b>this</b> <ref resolved='predef::Concurrent.Future'>Future</ref>. +  The return value must be a <ref resolved='predef::Concurrent.Future'>Future</ref> that promises +  the new result.</p> + </text></group><group><param name='failure'/><text><p>Function to be called. The first argument will be the +  <b>failure</b> result of <b>this</b> <ref resolved='predef::Concurrent.Future'>Future</ref>. +  The return value must be a <ref resolved='predef::Concurrent.Future'>Future</ref> that promises +  the new success result. +  If this callback is omitted, it will default to the same callback as +  <expr>success</expr>.</p> + </text></group><group><param name='extra'/><text><p>Any extra context needed for +  <expr>success</expr> and <expr>failure</expr>. They will be provided +  as arguments two and onwards when the callbacks are called.</p> + </text></group><group><returns/><text><p>The new <ref resolved='predef::Concurrent.Future'>Future</ref>.</p> + </text></group><group><note/><text><p>This method is used if your callbacks return a <ref resolved='predef::Concurrent.Future'>Future</ref> again.</p> + </text></group><group><seealso/><text><p><ref resolved='predef::Concurrent.Future.transform'>transform()</ref>, <ref resolved='predef::Concurrent.Future.map_with'>map_with()</ref>, <ref resolved='predef::Concurrent.Future.recover_with'>recover_with</ref></p>   </text></group></doc>   <method name='transform_with'>   <arguments><argument name='success'><type><function><argtype><mixed/></argtype><argtype><varargs><mixed/></varargs></argtype><returntype><object resolved='predef::Concurrent.Future'>this_program</object></returntype></function></type></argument><argument name='failure'><type><or><function><argtype><mixed/></argtype><argtype><varargs><mixed/></varargs></argtype><returntype><object resolved='predef::Concurrent.Future'>this_program</object></returntype></function><void/></or></type></argument><argument name='extra'><type><varargs><mixed/></varargs></type></argument></arguments>   <returntype><object resolved='predef::Concurrent.Future'>this_program</object></returntype>   </method>   </docgroup> - <docgroup homogen-name='zip' homogen-type='method'><doc><group><returns/><text><p>A <ref resolved='predef::Concurrent.Future'>Future</ref> that will be fulfilled with an + <docgroup homogen-name='zip' homogen-type='method'><doc><group><param name='others'/><text><p>The other futures (results) you want to append.</p> + </text></group><group><returns/><text><p>A new <ref resolved='predef::Concurrent.Future'>Future</ref> that will be fulfilled with an    array of the fulfilled result of this object followed -  by the fulfilled results of <ref resolved='predef::Concurrent.Future.zip.others'>others</ref>.</p> +  by the fulfilled results of other futures.</p>   </text></group><group><seealso/><text><p><ref resolved='predef::Concurrent.results'>results()</ref></p>   </text></group></doc>   <method name='zip'> -  + <arguments><argument name='others'><type><array><valuetype><object resolved='predef::Concurrent.Future'>this_program</object></valuetype></array></type></argument></arguments> + <returntype><object resolved='predef::Concurrent.Future'>this_program</object></returntype> + </method> + <method name='zip'><modifiers><local/><variant/></modifiers>   <arguments><argument name='others'><type><varargs><object resolved='predef::Concurrent.Future'>this_program</object></varargs></type></argument></arguments>   <returntype><object resolved='predef::Concurrent.Future'>this_program</object></returntype>   </method>   </docgroup>   </class>   <class name='Promise'>   <doc><text><p>Promise to provide a <ref resolved='predef::Concurrent.Future'>Future</ref> value.</p>   <p> Objects of this class are typically kept internal to the    code that provides the <ref resolved='predef::Concurrent.Future'>Future</ref> value. The only thing    that is directly returned to the user is the return    value from <ref resolved='predef::Concurrent.Promise.future'>future()</ref>.</p>   </text><group><seealso/><text><p><ref resolved='predef::Concurrent.Future'>Future</ref>, <ref resolved='predef::Concurrent.Promise.future'>future()</ref></p>   </text></group></doc> -  + <docgroup homogen-name='any_results' homogen-type='method'><doc><text><p>Sets the number of failures to be accepted in the list of futures +  this promise +  depends upon to unlimited. It is equivalent to <expr>max_failures(-1)</expr>.</p> + </text><group><returns/><text><p>The new <ref resolved='predef::Concurrent.Promise'>Promise</ref>.</p> + </text></group><group><seealso/><text><p><ref resolved='predef::Concurrent.Promise.depend'>depend()</ref>, <ref resolved='predef::Concurrent.Promise.max_failures'>max_failures()</ref></p> + </text></group></doc> + <method name='any_results'> + <arguments/> + <returntype><object resolved='predef::Concurrent.Promise'>this_program</object></returntype> + </method> + </docgroup>   <docgroup homogen-name='create' homogen-type='method'><doc><text><p>Creates a new promise, optionally initialised from a traditional callback    driven method via <expr>executor(resolve, reject, extra ... )</expr>.</p>   </text><group><seealso/><text><p><url>https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Promise</url></p>   </text></group></doc>   <method name='create'><modifiers><protected/></modifiers>   <arguments><argument name='executor'><type><or><void/><function><argtype><function><argtype><mixed/></argtype><returntype><void/></returntype></function></argtype><argtype><function><argtype><mixed/></argtype><returntype><void/></returntype></function></argtype><argtype><varargs><mixed/></varargs></argtype><returntype><void/></returntype></function></or></type></argument><argument name='extra'><type><varargs><mixed/></varargs></type></argument></arguments>   <returntype><void/></returntype>   </method>   </docgroup> -  + <docgroup homogen-name='depend' homogen-type='method'><doc><text><p>Add futures to the list of futures which the current object depends upon.</p> + <p> If called without arguments it will produce a new <ref resolved='predef::Concurrent.Future'>Future</ref> +  from a new <ref resolved='predef::Concurrent.Promise'>Promise</ref> which is implictly added to the dependency list.</p> + </text><group><param name='futures'/><text><p>The list of <expr>futures</expr> we want to add to the list we depend upon.</p> + </text></group><group><returns/><text><p>The new <ref resolved='predef::Concurrent.Promise'>Promise</ref>.</p> + </text></group><group><note/><text><p>Can be called multiple times to add more.</p> + </text></group><group><note/><text><p>Once the promise has been materialised (when either <ref resolved='predef::Concurrent.Future.on_success'>on_success()</ref>, +  <ref resolved='predef::Concurrent.Future.on_failure'>on_failure()</ref> or <ref resolved='predef::Concurrent.Future.get'>get()</ref> has been called on this object), it is +  not possible to call <ref resolved='predef::Concurrent.Promise.depend'>depend()</ref> anymore.</p> + </text></group><group><seealso/><text><p><ref resolved='predef::Concurrent.Promise.fold'>fold()</ref>, <ref resolved='predef::Concurrent.Promise.first_completed'>first_completed()</ref>, <ref resolved='predef::Concurrent.Promise.max_failures'>max_failures()</ref>, <ref resolved='predef::Concurrent.Promise.min_failures'>min_failures()</ref>, +  <ref resolved='predef::Concurrent.Promise.any_results'>any_results()</ref>, <ref resolved='predef::Concurrent.results'>Concurrent.results()</ref>, <ref resolved='predef::Concurrent.all'>Concurrent.all()</ref></p> + </text></group></doc> + <method name='depend'> + <arguments><argument name='futures'><type><array><valuetype><object resolved='predef::Concurrent.Future'>Future</object></valuetype></array></type></argument></arguments> + <returntype><object resolved='predef::Concurrent.Promise'>this_program</object></returntype> + </method> + <method name='depend'><modifiers><local/><variant/></modifiers> + <arguments><argument name='futures'><type><varargs><object resolved='predef::Concurrent.Future'>Future</object></varargs></type></argument></arguments> + <returntype><object resolved='predef::Concurrent.Promise'>this_program</object></returntype> + </method> + <method name='depend'><modifiers><variant/></modifiers> + <arguments/> + <returntype><object resolved='predef::Concurrent.Promise'>this_program</object></returntype> + </method> + </docgroup>   <docgroup homogen-name='failure' homogen-type='method'><doc><text><p>Reject the <ref resolved='predef::Concurrent.Future'>Future</ref> value.</p>   </text><group><param name='value'/><text><p>Failure result of the <ref resolved='predef::Concurrent.Future'>Future</ref>.</p>   </text></group><group><throws/><text><p>Throws an error if the <ref resolved='predef::Concurrent.Future'>Future</ref> already has been fulfilled    or failed.</p>   <p> Mark the <ref resolved='predef::Concurrent.Future'>Future</ref> as failed, and schedule the <ref resolved='predef::Concurrent.Future.on_failure'>on_failure()</ref>    callbacks to be called as soon as possible.</p>   </text></group><group><seealso/><text><p><ref resolved='predef::Concurrent.Promise.try_failure'>try_failure()</ref>, <ref resolved='predef::Concurrent.Promise.success'>success()</ref>, <ref resolved='predef::Concurrent.Future.on_failure'>on_failure()</ref></p>   </text></group></doc>   <method name='failure'>   <arguments><argument name='value'><type><mixed/></type></argument></arguments> - <returntype><void/></returntype> + <returntype><object resolved='predef::Concurrent.Promise'>this_program</object></returntype>   </method>   </docgroup> -  + <docgroup homogen-name='first_completed' homogen-type='method'><doc><text><p>It evaluates to the first future that completes of the list +  of futures it depends upon.</p> + </text><group><returns/><text><p>The new <ref resolved='predef::Concurrent.Promise'>Promise</ref>.</p> + </text></group><group><seealso/><text><p><ref resolved='predef::Concurrent.Promise.depend'>depend()</ref>, <ref resolved='predef::Concurrent.first_completed'>Concurrent.first_completed()</ref></p> + </text></group></doc> + <method name='first_completed'> + <arguments/> + <returntype><object resolved='predef::Concurrent.Promise'>this_program</object></returntype> + </method> + </docgroup> + <docgroup homogen-name='fold' homogen-type='method'><doc><group><param name='initial'/><text><p>Initial value of the accumulator.</p> + </text></group><group><param name='fun'/><text><p>Function to apply. The first argument is the result of +  one of the <ref>futures</ref>. The second argument is the current value +  of the accumulator.</p> + </text></group><group><param name='extra'/><text><p>Any extra context needed for <ref resolved='predef::Concurrent.Promise.fold.fun'>fun</ref>. They will be provided +  as arguments three and onwards when <ref resolved='predef::Concurrent.Promise.fold.fun'>fun</ref> is called.</p> + </text></group><group><returns/><text><p>The new <ref resolved='predef::Concurrent.Promise'>Promise</ref>.</p> + </text></group><group><note/><text><p>If <ref resolved='predef::Concurrent.Promise.fold.fun'>fun</ref> throws an error it will fail the <ref resolved='predef::Concurrent.Future'>Future</ref>.</p> + </text></group><group><note/><text><p><ref resolved='predef::Concurrent.Promise.fold.fun'>fun</ref> may be called in any order, and will be called +  once for every <ref resolved='predef::Concurrent.Future'>Future</ref> it depends upon, unless one of the +  calls fails in which case no further calls will be +  performed.</p> + </text></group><group><seealso/><text><p><ref resolved='predef::Concurrent.Promise.depend'>depend()</ref>, <ref resolved='predef::Concurrent.fold'>Concurrent.fold()</ref></p> + </text></group></doc> + <method name='fold'> + <arguments><argument name='initial'><type><mixed/></type></argument><argument name='fun'><type><function><argtype><mixed/></argtype><argtype><mixed/></argtype><argtype><varargs><mixed/></varargs></argtype><returntype><mixed/></returntype></function></type></argument><argument name='extra'><type><varargs><mixed/></varargs></type></argument></arguments> + <returntype><object resolved='predef::Concurrent.Promise'>this_program</object></returntype> + </method> + </docgroup>   <docgroup homogen-name='future' homogen-type='method'><doc><text><p>The future value that we promise.</p>   </text></doc>   <method name='future'>   <arguments/>   <returntype><object resolved='predef::Concurrent.Future'>Future</object></returntype>   </method>   </docgroup>   <docgroup homogen-name='Future' homogen-type='inherit'>   <inherit name='Future'><classname resolved='predef::Concurrent.Future'>Future</classname></inherit>   </docgroup> -  + <docgroup homogen-name='max_failures' homogen-type='method'><doc><group><param name='max'/><text><p>Specifies the maximum number of failures to be accepted in +  the list of futures this promise depends upon.</p> + <p> <expr>-1</expr> means unlimited.</p> + <p> Defaults to <expr>0</expr>.</p> + </text></group><group><returns/><text><p>The new <ref resolved='predef::Concurrent.Promise'>Promise</ref>.</p> + </text></group><group><seealso/><text><p><ref resolved='predef::Concurrent.Promise.depend'>depend()</ref>, <ref resolved='predef::Concurrent.Promise.min_failures'>min_failures()</ref>, <ref resolved='predef::Concurrent.Promise.any_results'>any_results()</ref></p> + </text></group></doc> + <method name='max_failures'> + <arguments><argument name='max'><type><int><min>-1</min><max/></int></type></argument></arguments> + <returntype><object resolved='predef::Concurrent.Promise'>this_program</object></returntype> + </method> + </docgroup> + <docgroup homogen-name='min_failures' homogen-type='method'><doc><group><param name='min'/><text><p>Specifies the minimum number of failures to be required in +  the list of futures this promise depends upon. Defaults +  to <expr>0</expr>.</p> + </text></group><group><returns/><text><p>The new <ref resolved='predef::Concurrent.Promise'>Promise</ref>.</p> + </text></group><group><seealso/><text><p><ref resolved='predef::Concurrent.Promise.depend'>depend()</ref>, <ref resolved='predef::Concurrent.Promise.max_failures'>max_failures()</ref></p> + </text></group></doc> + <method name='min_failures'> + <arguments><argument name='min'><type><int><min>0</min><max/></int></type></argument></arguments> + <returntype><object resolved='predef::Concurrent.Promise'>this_program</object></returntype> + </method> + </docgroup>   <docgroup homogen-name='success' homogen-type='method'><doc><text><p>Fulfill the <ref resolved='predef::Concurrent.Future'>Future</ref>.</p>   </text><group><param name='value'/><text><p>Result of the <ref resolved='predef::Concurrent.Future'>Future</ref>.</p>   </text></group><group><throws/><text><p>Throws an error if the <ref resolved='predef::Concurrent.Future'>Future</ref> already has been fulfilled    or failed.</p>   <p> Mark the <ref resolved='predef::Concurrent.Future'>Future</ref> as fulfilled, and schedule the <ref resolved='predef::Concurrent.Future.on_success'>on_success()</ref>    callbacks to be called as soon as possible.</p>   </text></group><group><seealso/><text><p><ref resolved='predef::Concurrent.Promise.try_success'>try_success()</ref>, <ref resolved='predef::Concurrent.Promise.try_failure'>try_failure()</ref>, <ref resolved='predef::Concurrent.Promise.failure'>failure()</ref>, <ref resolved='predef::Concurrent.Future.on_success'>on_success()</ref></p>   </text></group></doc>   <method name='success'>   <arguments><argument name='value'><type><mixed/></type></argument></arguments> - <returntype><void/></returntype> + <returntype><object resolved='predef::Concurrent.Promise'>this_program</object></returntype>   </method>   </docgroup>   <docgroup homogen-name='try_failure' homogen-type='method'><doc><text><p>Maybe reject the <ref resolved='predef::Concurrent.Future'>Future</ref> value.</p>   </text><group><param name='value'/><text><p>Failure result of the <ref resolved='predef::Concurrent.Future'>Future</ref>.</p>   <p> Mark the <ref resolved='predef::Concurrent.Future'>Future</ref> as failed if it hasn't already been fulfilled,    and in that case schedule the <ref resolved='predef::Concurrent.Future.on_failure'>on_failure()</ref> callbacks to be    called as soon as possible.</p>   </text></group><group><seealso/><text><p><ref resolved='predef::Concurrent.Promise.failure'>failure()</ref>, <ref resolved='predef::Concurrent.Promise.success'>success()</ref>, <ref resolved='predef::Concurrent.Future.on_failure'>on_failure()</ref></p>   </text></group></doc> - <method name='try_failure'> + <method name='try_failure'><modifiers><local/></modifiers>   <arguments><argument name='value'><type><mixed/></type></argument></arguments> - <returntype><void/></returntype> + <returntype><object resolved='predef::Concurrent.Promise'>this_program</object></returntype>   </method>   </docgroup>   <docgroup homogen-name='try_success' homogen-type='method'><doc><text><p>Fulfill the <ref resolved='predef::Concurrent.Future'>Future</ref> if it hasn't been fulfilled or failed already.</p>   </text><group><param name='value'/><text><p>Result of the <ref resolved='predef::Concurrent.Future'>Future</ref>.</p>   <p> Mark the <ref resolved='predef::Concurrent.Future'>Future</ref> as fulfilled if it hasn't already been fulfilled    or failed, and in that case schedule the <ref resolved='predef::Concurrent.Future.on_success'>on_success()</ref> callbacks    to be called as soon as possible.</p>   </text></group><group><seealso/><text><p><ref resolved='predef::Concurrent.Promise.success'>success()</ref>, <ref resolved='predef::Concurrent.Promise.try_failure'>try_failure()</ref>, <ref resolved='predef::Concurrent.Promise.failure'>failure()</ref>, <ref resolved='predef::Concurrent.Future.on_success'>on_success()</ref></p>   </text></group></doc> - <method name='try_success'> + <method name='try_success'><modifiers><local/></modifiers>   <arguments><argument name='value'><type><mixed/></type></argument></arguments> - <returntype><void/></returntype> + <returntype><object resolved='predef::Concurrent.Promise'>this_program</object></returntype>   </method>   </docgroup>   </class>   </module>   <module name='Crypto'>   <doc><text><p>Various cryptographic classes and functions.</p>   <p> <b>Hash functions</b>    These are based on the <ref resolved='predef::Crypto.Hash'>Hash</ref> API; <ref resolved='predef::Crypto.MD2'>MD2</ref>, <ref resolved='predef::Crypto.MD4'>MD4</ref>, <ref resolved='predef::Crypto.MD5'>MD5</ref>,    <ref resolved='predef::Crypto.SHA1'>SHA1</ref>, <ref resolved='predef::Crypto.SHA256'>SHA256</ref>.</p>   <p> <b>Stream cipher functions</b>