8000 Fix: ODP Event manager not consistent in triggering events. by mnoman09 · Pull Request #326 · optimizely/csharp-sdk · GitHub
[go: up one dir, main page]

Skip to content

Fix: ODP Event manager not consistent in triggering events. #326

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Next Next commit
Removing thread.sleep as it seems unnecessary
  • Loading branch information
mnoman09 committed Feb 8, 2023
commit b9ed18987fe8b69c5d93993908a23d5df6fb98db
4 changes: 2 additions & 2 deletions OptimizelySDK/Odp/OdpEventManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,9 @@ protected virtual void Run()
FlushQueue();
}

if (!_eventQueue.TryTake(out object item, 50))
if (!_eventQueue.TryTake(out object item, (int)
(_flushingIntervalDeadline - DateTime.Now.MillisecondsSince1970())))
{
Thread.Sleep(50);
continue;
}

Expand Down
0