Skip to content

Commit

Permalink
fix warnings, clean up debugging logs
Browse files Browse the repository at this point in the history
Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
  • Loading branch information
bacherfl committed Jan 2, 2024
1 parent 2640c22 commit d999ea3
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions src/OpenFeature/EventExecutor.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Diagnostics.CodeAnalysis;
using System.Threading;
using System.Threading.Channels;
using System.Threading.Tasks;
Expand All @@ -10,7 +7,6 @@

namespace OpenFeature
{
[SuppressMessage("warning", "CS4014")]
internal class EventExecutor
{
private readonly Mutex _mutex = new Mutex();
Expand All @@ -25,7 +21,9 @@ internal class EventExecutor

public EventExecutor()
{
#pragma warning disable CS4014 // Because this call is not awaited, execution of the current method continues before the call is completed
this.ProcessEventAsync();
#pragma warning restore CS4014 // Because this call is not awaited, execution of the current method continues before the call is completed
}

internal void AddApiLevelHandler(ProviderEventTypes eventType, EventHandlerDelegate handler)
Expand Down Expand Up @@ -128,16 +126,14 @@ private void StartListeningAndShutdownOld(FeatureProviderReference newProvider,
if (!this.IsProviderActive(newProvider))
{
this._activeSubscriptions.Add(newProvider);
#pragma warning disable CS4014 // Because this call is not awaited, execution of the current method continues before the call is completed
this.ProcessFeatureProviderEventsAsync(newProvider);
#pragma warning restore CS4014 // Because this call is not awaited, execution of the current method continues before the call is completed
}

if (oldProvider != null && !this.IsProviderBound(oldProvider))
{
this._activeSubscriptions.Remove(oldProvider);
if (oldProvider.Provider == null)
{
Console.WriteLine("wtf");
}
var channel = oldProvider.Provider.GetEventChannel();
if (channel != null)
{
Expand Down

0 comments on commit d999ea3

Please sign in to comment.