C# volatile if a method execute on different thread but non-concurrent, does it need to be volatile

前端 未结 0 1730
甜味超标
甜味超标 2021-01-25 14:07
using System;
using System.Threading;

class Program
{
    private static int i = 0;
    private static volatile int j = 0;

    static void Main(string[] args)
    {
           


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题