PRThreadType 编辑
The type of an NSPR thread, specified as a parameter to /wiki/en-US/docs/Mozilla/Projects/NSPR/Reference/PR_CreateThread
.
Syntax
#include <prthread.h> typedef enum PRThreadType { PR_USER_THREAD, PR_SYSTEM_THREAD } PRThreadType;
Enumerators
PR_USER_THREAD
/wiki/en-US/docs/Mozilla/Projects/NSPR/Reference/PR_Cleanup
blocks until the last thread of typePR_USER_THREAD
terminates.PR_SYSTEM_THREAD
- NSPR ignores threads of type
PR_SYSTEM_THREAD
when determining when a call to/wiki/en-US/docs/Mozilla/Projects/NSPR/Reference/PR_Cleanup
should return.
Description
Threads can be either user threads or system threads. NSPR allows the client to synchronize the termination of all user threads and ignores those created as system threads. This arrangement implies that a system thread should not have volatile data that needs to be safely stored away. The applicability of system threads is somewhat dubious; therefore, they should be used with caution.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论