Pike v8.1 release 6

Method Concurrent.Future()->on_success()


Method on_success

this_program on_success(function(mixed, mixed ... :void) cb, mixed ... extra)

Description

Register a callback that is to be called on fulfillment.

Parameter cb

Function to be called. The first argument will be the result of the Future.

Parameter extra

Any extra context needed for cb. They will be provided as arguments two and onwards when cb is called.

Note

cb will always be called from the main backend.

See also

on_failure()