如何标记一个类是线程安全的(或不)? [英] How to tag that a class is thread-safe (or not)?

查看:162
本文介绍了如何标记一个类是线程安全的(或不)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在MSDN文档中,我们看到:

In MSDN documentation we see :

控制台


线程安全

Thread Safety

此类型是线程安全的。

TextWriter


线程安全

Thread Safety

此类型的
的任何公共静态
(在Visual Basic中共享)是线程安全的。任何
实例成员不能保证
是线程安全的。

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

我已经开发了一个类似的)类到控制台一个,那么如何标记它来线程安全?我正在提取XML文档,我会知道我可以如何在MSDN Doc文档中。

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'.

希望我够清楚...

感谢您的帮助!

推荐答案

将此细节添加到 < summary> < remarks> 标签。

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.

这篇关于如何标记一个类是线程安全的(或不)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆