Skip to content
Discussion options

You must be logged in to vote

It sounds like related to eager bound of P/Inovke. If the P/Invoke is bound earlier, the .cctor of the type also need to be run earlier.

Would you happen to know in which cases the JIT ignores the precise initialisation semantics?

To be precise - there is not really a precise initialization semantic. It's only guarantee to be earlier than required point, and the implementation detail tries to be as late as possible to make it more predictable.

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
3 replies
@crystal-rgb
Comment options

@huoyaoyuan
Comment options

@crystal-rgb
Comment options

Comment options

You must be logged in to vote
2 replies
@crystal-rgb
Comment options

@huoyaoyuan
Comment options

Answer selected by crystal-rgb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants