开发者

What is SyncBlockIndex and what is it used in .NET for?

I'm trying to gain deeper understanding of the way CLR works and can't find a good determination of "SyncBlockIndex". I've found out that e开发者_Go百科ach managed object has it, but what is it? What is it used for?


from MSDN:

This index has multiple purposes: As implied by its name it is used for synchronization, whenever the "lock" keyword is used. It is also used as the default hash code for Object.GetHashCode(). It does not provide the best distribution properties for a hash code, but it meets the minimum requirements for a hash code for reference equality. The syncindex remains constant throughout the life of the object.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜