コード例 #1
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            TextFile       sharedfile = new TextFile();
            FileController fc         = new FileController(sharedfile);

            // start threads for readers and writers:
            new Thread(R).Start(fc);
            new Thread(R).Start(fc);
            new Thread(W).Start(fc);
        }
コード例 #2
0
 public WThread(FileController b)
 {
     this.b = b;
     InitializeComponent();
 }
コード例 #3
0
 public RThread(FileController b)
 {
     this.b  = b;
     reading = false;
     InitializeComponent();
 }