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
Let assume that we use all the default callbacks and values.
When the _ticker is not called during 5sec and we recognise this as ANR and send the report, assign interval initial value and set the _reported to true.
We start our while cycle from the beginning: _tick is not 0 so we don't schedule _ticker again - it is ok, next we put our thread to the sleep on 5sec one more time.
But imagine that our _ticker is not called again during this 5s but is called at the time when we step on condition "if (_tick != 0 && !_reported)" and it is race condition because we write and read _tick and _reported at the same moment of time.
Best,
Taras
The text was updated successfully, but these errors were encountered:
Best,
Taras
The text was updated successfully, but these errors were encountered: