Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ public async ValueTask<T> BuildAndEnrollAsync(MessageContext messaging, Cancella
var dbContext = _constructor(builder.Options);

var transaction = new MappedEnvelopeTransaction(dbContext, messaging);
// ReSharper disable once MethodHasAsyncOverload
messaging.EnlistInOutbox(transaction);

await messaging.EnlistInOutboxAsync(transaction);

return dbContext;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,7 @@ public async ValueTask<T> BuildAndEnrollAsync(MessageContext messaging, Cancella
var dbContext = _constructor(builder.Options);

var transaction = new MappedEnvelopeTransaction(dbContext, messaging);
// ReSharper disable once MethodHasAsyncOverload
messaging.EnlistInOutbox(transaction);
await messaging.EnlistInOutboxAsync(transaction);

return dbContext;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Persistence/Wolverine.RDBMS/Polling/DatabaseBatcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public async Task DrainAsync()
{
try
{
_internalCancellation.Cancel();
await _internalCancellation.CancelAsync();

_batchingBlock.Complete();
await _batchingBlock.Completion;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,11 @@ public ValueTask DeferAsync(Envelope envelope)
return new ValueTask();
}

public ValueTask DisposeAsync()
public async ValueTask DisposeAsync()
{
_cancellation.Cancel();
await _cancellation.CancelAsync();

_task.SafeDispose();
return ValueTask.CompletedTask;
}

public Uri Address { get; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,20 +39,17 @@ public async ValueTask DeferAsync(Envelope envelope)
await _queue.SendAsync(envelope, _cancellation.Token);
}

public ValueTask DisposeAsync()
public async ValueTask DisposeAsync()
{
_cancellation.Cancel();
await _cancellation.CancelAsync();
_task.SafeDispose();
_scheduledTask.SafeDispose();
return ValueTask.CompletedTask;
}

public Uri Address => _queue.Uri;
public ValueTask StopAsync()
public async ValueTask StopAsync()
{
_cancellation.Cancel();

return ValueTask.CompletedTask;
await _cancellation.CancelAsync();
}

private async Task lookForScheduledMessagesAsync()
Expand Down
Loading