Multithreading 可选取消点

Multithreading 可选取消点,multithreading,pthreads,posix,Multithreading,Pthreads,Posix,我只是想知道可选取消点的含义。就像我们有强制取消点,这意味着当在线程中调用强制取消点下的任何函数时,将出现取消点。所以,它是否像可选的,取消点可能会出现,也可能不会。我对此进行了检查,但没有找到任何确切的答案。POSIX要求某些函数作为取消点,并表示取消点可能出现在某些函数中(可选取消点)。您可以阅读手册中的全部强制和可选取消点列表: Cancellation points POSIX.1 specifies that certain functions must, and ce

我只是想知道可选取消点的含义。就像我们有强制取消点,这意味着当在线程中调用强制取消点下的任何函数时,将出现取消点。所以,它是否像可选的,取消点可能会出现,也可能不会。我对此进行了检查,但没有找到任何确切的答案。

POSIX要求某些函数作为取消点,并表示取消点可能出现在某些函数中(可选取消点)。您可以阅读手册中的全部强制和可选取消点列表:

 Cancellation points
       POSIX.1 specifies that certain functions must, and certain other
       functions may, be cancellation points.  If a thread is cancelable,
       its cancelability type is deferred, and a cancellation request is
       pending for the thread, then the thread is canceled when it calls a
       function that is a cancellation point.