c# - Is int? thread safe? -


I know that. The threads are all 32-bit types (i.e., int , Bool , etc.) threads in the net. That is, no partial typing (according to specifications) will not be.

But, does this apply to such a int? (nullable int)?

The question is bad word, and hence the confusion in the answer so far. The question should be, "Is it going to be atom ?"

No, not at all. The device is very clear at this point:

reads the following data types and writes atom: bool, char, byte, sbyte, short, ushort, uint, int, float, and reference type . In addition, reads about the enum types with an underlying type in the previous list and writes the atoms also.

This is entirely possible for thread, writes other types of And writes, including long, unholy, double, and decimal, as well as user defined types. For example, suppose you have an integer? Variable X, which is currently null in the value. Therefore, there is an int, set to zero and a bull, which is set to false. Now on another thread, you write "5" for zero with zero, it is completely legal for another thread, which is to read non-zero-qualified zeros from X because "true" in the ball Can be set before. Int.


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -