由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Programming版 - is pthread_mutex_destroy() required to call?
相关主题
pthread_create inside a constructorc++问题
double-checked lockingpthread in cygwin
how to statically initialze a mutex in class?waiting for N condition variables in linux
请教pthread producer-consumer问题condional variable thread sync 问题 (转载)
问个 ctor/copy ctor的问题多线程的程序设计有什么好书推荐? (转载)
some C++ interview questionsquestion about the read/write locker
请问关于c++实现singleton的问题?how many ways in C++ to release a mutex?
EBUSY 的定义How to avoid deadlock ?
相关话题的讨论汇总
话题: mutex话题: pthread话题: destroy话题: call
进入Programming版参与讨论
1 (共1页)
g*********s
发帖数: 1782
1
it seems if you initialize the mutex by pthread_mutex_init(), u will have to
call pthread_mutex_destroy().
what if you just use the const initializer?
in ctor:
_lock (PTHREAD_MUTEX_INITIALIZER);
in dtor:
pthread_mutex_destroy(&lock) // is this necessary?
1 (共1页)
进入Programming版参与讨论
相关主题
How to avoid deadlock ?问个 ctor/copy ctor的问题
你们都检查这些system call的返回值吗?some C++ interview questions
连续release mutex/semphore 2次有什么问题吗?请问关于c++实现singleton的问题?
pthread mutex能不能用与thread和process之间EBUSY 的定义
pthread_create inside a constructorc++问题
double-checked lockingpthread in cygwin
how to statically initialze a mutex in class?waiting for N condition variables in linux
请教pthread producer-consumer问题condional variable thread sync 问题 (转载)
相关话题的讨论汇总
话题: mutex话题: pthread话题: destroy话题: call