yyzybb537 / libgo

Go-style concurrency in C++11
MIT License
3.22k stars 758 forks source link

LockedChannelImpl类析构中断言作用是什么 #254

Closed PuTiz closed 3 years ago

PuTiz commented 3 years ago

` ~LockedChannelImpl() { DebugPrint(dbgmask & dbg_channel, "[id=%ld] Channel destory.", this->getId());

    assert(lock_.try_lock());
}`

后边这个断言作用是什么?如果返回true那不是给锁上了吗?

PuTiz commented 3 years ago

重复了