expectOnDestroy
Blocks until a single onDestroy lifecycle event has been received.
Lifecycle events are sticky; if any events were received prior to calling this method and an event has been received, this method will return immediately.
Parameters
timeout
maximum amount of time (in ms) to wait for an onDestroy event
Throws
if the lock is interrupted