使用 POSIX 的并发
Concurrency using POSIX
我看到一段话:
The definition of concurrent execution in POSIX requires that "functions that suspend the execution of the calling thread shall not cause the execution of the other threads to be indefinitely suspended".
谁能给我解释一下(尤其是什么是调用线程——我明白什么是调用函数)。
调用线程是调用阻塞函数的执行线程。如果你有 两个 线程,那么一个线程可以调用像 sleep
这样的阻塞函数来休眠一个小时,而另一个线程也可能不会停止一小时,因为发生在第一个电话中的电话。
我看到一段话:
The definition of concurrent execution in POSIX requires that "functions that suspend the execution of the calling thread shall not cause the execution of the other threads to be indefinitely suspended".
谁能给我解释一下(尤其是什么是调用线程——我明白什么是调用函数)。
调用线程是调用阻塞函数的执行线程。如果你有 两个 线程,那么一个线程可以调用像 sleep
这样的阻塞函数来休眠一个小时,而另一个线程也可能不会停止一小时,因为发生在第一个电话中的电话。