microsoft / PowerPlatform-DataverseServiceClient

Code Replica for Microsoft.PowerPlatform.Dataverse.Client and supporting nuget packages.
MIT License
283 stars 52 forks source link

ServiceClient DisableCrossThreadSafeties is not working for Command_ExecuteAsyncImpl #420

Closed BowenWang0626 closed 10 months ago

BowenWang0626 commented 11 months ago

The lock object was initialized but never used: image

While the Command_Execute, the lock object was initialized and locked: image

MattB-msft commented 10 months ago

@BowenWang0626

This is intentional and by design. Its initialized there as we use the same functions for handling error and retry behavior between sync and async behaviors.

Cross thread Safeties are not required for Async Operations. That behavior is detrimental to async ops.