XUserUnregisterForChangeEvent
Unregisters a previously registered user change callback.Syntax
Parameters
token _In_Type: XTaskQueueRegistrationToken A token that XUserRegisterForChangeEvent returns, identifying the callback to un-register. wait _In_
Type: bool Indicates whether to block until any pending callbacks are complete.
Return value
Type: bool Returns false if wait is false and the un-register is pending. Returns true otherwise.Remarks
This function isn’t safe to call on a time-sensitive thread. For more information, see Time-sensitive threads.
- If callbacks are not executing for the callback token, the call returns true.
- If callbacks are executing and wait is true, the call blocks until the executing callback completes.
- If callbacks are executing and wait is false, the call does not block but returns false. Once the callback for the token is complete, the token automatically un-registers.
- You can block on unregistration to ensure your callbacks never invoke after an un-registration call.
- You can choose not to block. If you need to ensure your callbacks complete before deleting data, you can periodically call unregister with false for wait. When it finally returns true, all your callbacks are done and you can delete state.
- If an unregister call does not invoke the callback, you can just pass false for wait and ignore the return value.
