_promiseCompleted(futureIdentifier:)
Debug hook: complete a specific promise and return its creation location.
func _promiseCompleted(futureIdentifier: _NIOEventLoopFutureIdentifier) -> (file: StaticString, line: UInt)?
This debug hook is called by EventLoopFutures and EventLoopPromises when they are deinited, and removes the data from the promise tracking map and, if available, provides that data as its return value. It combines with _promiseCreated
to provide high-fidelity diagnostics for debugging leaked promises.
In release mode, this function will never be called.
It is valid for an EventLoop
not to implement any of the two _promise
functions. If either of them are implemented, however, both of them should be implemented.