Register Flag Callback

Signatures

bool registerFlagCallback(string name, function handler)
bool registerFlagCallback(string name, function handler, u64 duration)

Description

Registers a handler that will be triggered asynchronously when the specified flag is created, set or deleted.

Waits up to the specified duration and returns true if the flag exists within that time, or false if the timeout is exceeded.

The handler is registered regardless of the wait outcome.

Arguments

Name

The name of the flag to register.

Handler

The Callback function that is executed when a flag is changed.

Duration

The time to wait in milliseconds.

Is optional and set to 0 by default.

If set to anything above 0, it will call Wait Flag.

Last updated