WaitOne() and WaitOne(int, bool)# DotNet - 窗口里的风景
E*s
1 楼
what is their difference? Below is a little program I wrote to test
multithreading. When I use WaitOne(), it can not work properly. when I switch
to WaitOne(0, true), I got expected result. I read the manual, but still not
100% sure what their difference really is? Anyone, any idea?
You can just cut-paste this one, compile, run this small program.
Happy holidays, everyone.
====
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
multithreading. When I use WaitOne(), it can not work properly. when I switch
to WaitOne(0, true), I got expected result. I read the manual, but still not
100% sure what their difference really is? Anyone, any idea?
You can just cut-paste this one, compile, run this small program.
Happy holidays, everyone.
====
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;