redth-org / AndHUD

Android Progress HUD and Dialog helpers for Xamarin.Android apps!
Apache License 2.0
179 stars 69 forks source link

Add timeouts to semaphoreslim waits #58

Closed Cheesebaron closed 6 months ago

Cheesebaron commented 6 months ago

:sparkles: What kind of change does this PR introduce? (Bug fix, feature, docs update...)

Bug fix

:arrow_heading_down: What is the current behavior?

I have a production app where the App ends up in a deadlock because somehow the calling SemaphoreSlim.Wait inside of AndHUD ends up in a deadlock.

:new: What is the new behavior (if this is a feature change)?

I haven't been able to narrow down what exactly causes this, but it mainly happens when trying to dismiss AndHUD that is showing on Activity A, while navigating to Activity B.

:boom: Does this PR introduce a breaking change?

Worst case AndHUD won't dismiss if there is a timeout waiting for the semaphore.

:bug: Recommendations for testing

Try the bottom most "Deadlock" item in the Sample App

:memo: Links to relevant issues/docs

:thinking: Checklist before submitting