Can a Windows CRITICAL_SECTION object be configured to deny recursive access?

后端 未结 2 766
挽巷
挽巷 2021-01-19 07:52

By default, a CRITICAL_SECTION object is recursive. Can this behaviour be configured like a pthread mutex to enable or disable recursive thread access?

To clarify in

2条回答
  •  悲哀的现实
    2021-01-19 08:33

    No, it cannot. Documented APIs do not mention this in any way. Windows critical sections always accept recursive access.

提交回复
热议问题