可能的显示阻塞(show - stopper)将“this”作为参数从mixin内部传递给方法或构造器,这是被禁止的!
A potential show-stopper, passing "this" as an argument to a method or a constructor from inside a mixin is forbidden!
函数pthread_cond_wait主要就是用于阻塞线程的,它有两个参数;第一个是一个指向条件变量的指针,第二个是一个锁定了的互斥量。
The function primarily used for this is pthread_cond_wait . It takes two arguments; the first is a pointer to a condition variable, and the second is a locked mutex.
因此,Close方法会接收一个Timeout参数,并包括一个异步版本(因为它可能阻塞线程),而且Close还会抛出异常。
As a consequence, Close takes a Timeout and has an async version (since it can block), and also Close can throw Exceptions.
应用推荐