1
0
mirror of https://github.com/oliverbooth/VpSharp synced 2024-11-09 22:55:42 +00:00

Call ConfigureAwait for awaited methods

This commit is contained in:
Oliver Booth 2022-11-29 18:37:42 +00:00
parent 5ed2f4ca31
commit 002d53f003
No known key found for this signature in database
GPG Key ID: 32A00B35503AF634
2 changed files with 7 additions and 7 deletions

View File

@ -1,4 +1,4 @@
using VpSharp.Internal;
using VpSharp.Internal;
using VpSharp.Internal.NativeAttributes;
using static VpSharp.Internal.Native;
@ -49,7 +49,7 @@ public class VirtualParadiseModelObject : VirtualParadiseObject
ArgumentNullException.ThrowIfNull(action);
var builder = new VirtualParadiseModelObjectBuilder(Client, ObjectBuilderMode.Modify);
await Task.Run(() => action(builder));
await Task.Run(() => action(builder)).ConfigureAwait(true);
lock (Client.Lock)
{

View File

@ -1,4 +1,4 @@
using System.Numerics;
using System.Numerics;
using VpSharp.Exceptions;
using VpSharp.Extensions;
using VpSharp.Internal;
@ -98,16 +98,16 @@ public abstract class VirtualParadiseObject : IEquatable<VirtualParadiseObject>
switch (phase)
{
case BumpPhase.Begin:
await SendBegin();
await SendBegin().ConfigureAwait(true);
break;
case BumpPhase.End:
await SendEnd();
await SendEnd().ConfigureAwait(true);
break;
case null:
await SendBegin();
await SendEnd();
await SendBegin().ConfigureAwait(true);
await SendEnd().ConfigureAwait(true);
break;
}
}