Method Concurrent.Future()->filter()
- Method filter
this_programfilter(function(mixed,mixed... :bool)fun,mixed...extra)- Description
This specifies a callback that is only called on success, and allows you to selectively alter the future into a failure.
- Parameter
fun Function to be called. The first argument will be the success result of this Future. If the return value is
true, the future succeeds with the original success result. If the return value isfalse, the future fails with an UNDEFINED result.- Parameter
extra Any extra context needed for
fun. They will be provided as arguments two and onwards when the callback is called.- Returns
The new Future.
- See also