web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Service | Customer Service, Contact Center, Fie...
Suggested Answer

What is the function of DisableCrossThreadSafeties? Is there any risk if it is set to true or false

(0) ShareShare
ReportReport
Posted on by

I have a concurrent program to request crm, and then I found that the DisableCrossThreadSafeties property setting of CrmServiceClient supports concurrency, and found that setting it to true increases the concurrency efficiency by 50%. Is there any risk to crm or thread safety issues?

CrmServiceClient svc = new CrmServiceClient(ConfigurationManager.AppSettings["ConnStr"]);
svc.DisableCrossThreadSafeties = true;

Set to false: the total time-consuming program runs to completion, time-consuming: 164930 list count: 320 average each millisecond: 515

Set to true Total time-consuming program to run to completion, time-consuming: 79941 list count: 320 average each millisecond: 249

I have the same question (0)
  • Suggested answer
    Community Member Profile Picture
    on at
    RE: What is the function of DisableCrossThreadSafeties? Is there any risk if it is set to true or false

    Hi,

    CrmServiceClient itself is thread safe, but if you use DisableCrossThreadSafeties, it will cause thread safety issues.

    You can refer to the official API documentation, here is a very clear statement:

    CrmServiceClient.DisableCrossThreadSafeties Property (Microsoft.Xrm.Tooling.Connector) | Microsoft Docs

    pastedimage1627522507237v1.jpeg

    If this helped you, I'd appreciate it if you'd mark this as a Verified Answer, which may in turn help others as well.

    Best Regards,

    Frank Gong

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Service | Customer Service, Contact Center, Field Service, Guides

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 60 Super User 2025 Season 2

#2
Siv Sagar Profile Picture

Siv Sagar 52 Super User 2025 Season 2

#3
Daniyal Khaleel Profile Picture

Daniyal Khaleel 36 Most Valuable Professional

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans