You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Every example of calling enable or disable should be awaited.
Whilst technically you don't need to await them it's considered best practice to await or explicitly unawait any async calls.
The examples should also show a try block around any enable/disable calls to ensure that the disable method is called even if an exception is thrown.
awaitWakelockPlus.enable();
try {
/// do something and an exception might be thrown
}
finally {
/// ensure the wake lock is relased.awaitWakelockPlus.disable();
}
The text was updated successfully, but these errors were encountered:
Thanks for the package.
Just some feedback on the doco.
Every example of calling enable or disable should be awaited.
Whilst technically you don't need to await them it's considered best practice to await or explicitly unawait any async calls.
The examples should also show a try block around any enable/disable calls to ensure that the disable method is called even if an exception is thrown.
The text was updated successfully, but these errors were encountered: