Your location:Home>开发控件 版本控制 >开发控件

PostSharp Threading

PostSharp Threading

 

Make C# thread-safe without using locks.

 

Make your C# or VB applications thread-safe.

 

Starting new threads and tasks in .NET languages is simple, but ensuring that objects are thread-safe is not. Make your C# code thread-safe without using locks.

Choose the threading models that you want and have the built-in verification detect errors in your code before they cause random data races:

 

Address multithreading with machine-verified models.

 

Reduce complexity

 

Higher abstraction – Don’t get lost in the details of multithreading code. Raise the level of abstraction by applying thread safety models with attributes.

Design and implement – Choose thread-safety patterns when designing your application. Translate that design into a functioning code artifact easily and quickly.

Free up your brain – Let your most experienced developers work on other thorny problems. Thanks to prebuilt threading models, any developer on the team can accurately and confidently deal with multithreading in your C# code.

Thread Dispatching – A simple attribute allows you to easily dispatch work to background threads or to the UI.

 

Fail fast, fail sooner

 

Model validation – Once you choose a model, PostSharp will ensure that you are not breaking the rules. Get deterministic build-time or run-time errors instead of risking data races.

Make more of your unit tests – With randomness removed, even single-threaded unit tests will expose most threading issues.

Deadlock detection – Deadlocks are hard to diagnose and will frustrate users more than a controlled crash. Avoid the “Not Responding” situation and instead receive a detailed exception that outlines the stack trace for each thread involved.

 

You’re in the driver’s seat

 

Your choice – There are several valid approaches to thread safety in C#. We realize there is no silver bullet and offer you a number of models to choose from.

Leverage your investment – PostSharp works with any C#/VB codebase. There’s no need to move to a different language to achieve thread safety: make your VB or C# code thread safe.

Adopt incrementally – You can add thread safety one component at a time. There’s no need for a full application rewrite.

 

北京哲想软件有限公司