开发者

Are there any platforms that do not support reentrent mutex's or recursive locks?

I'm wondering if my implementatio开发者_JS百科n should expect that reentrant mutex's are supported or not. The code is supposed to portable/platform independent. I'm wondering if mutex recursion is common enough that it shouldn't be a concern.


It's usually a distinct option, available through a different function call. Even then it isn't "detected" it's just "permitted".

Sometimes, you WANT the lock to be recursive. Sometimes, you DON'T want the lock to be recursive. Any solution you come up with without explicitly allowing both conditions will not work universally for every mutex solution available without you imposing some contraints that don't exist in the libraries you'll be wrapping.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜