开发者

How to tag that a class is thread-safe (or not)?

开发者 https://www.devze.com 2023-02-01 14:46 出处:网络
In MSDN documentation we see : Console Thread Safety This type is thread safe. TextWriter Thread Safety Any public static

In MSDN documentation we see :

Console

Thread Safety

This type is thread safe.

TextWriter

Thread Safety

Any public static (Share开发者_运维百科d in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

I've developed a similar (static) class to the Console one, so how can I tag it to thread safe? I'm extracting XML documentation and I would know how I can this part like in the MSDN Doc'.

Hope I'm clear enough...

Thanks for help !


The Sandcastle Help File Builder project contains a useful XML Comments Guide.

It documents the threadsafety tag:

<threadsafety static="true|false" instance="true|false"/>

The root SHFB documentation page is here.


Add this detail to the <summary> or <remarks> tags.

There is no specific tag or convention on how to indicate a class is thread safe - you need to write it in your documentation.

0

精彩评论

暂无评论...
验证码 换一张
取 消