system.threading WaitHandle

本文详细介绍了 .NET Framework 中 WaitHandle 类的 WaitOne 方法,包括不同重载版本的使用方式及其特点。这些方法用于阻塞当前线程直到 WaitHandle 收到信号,支持指定超时时间和同步上下文。

http://msdn2.microsoft.com/zh-cn/library/system.threading.waithandle.waitone.aspx

名称 说明
WaitHandle.WaitOne () 当在派生类中重写时,阻塞当前线程,直到当前的 WaitHandle 收到信号。

由 .NET Compact Framework 支持。

WaitHandle.WaitOne (Int32, Boolean) 在派生类中被重写时,阻塞当前线程,直到当前的 WaitHandle 收到信号,使用 32 位有符号整数度量时间间隔并指定是否在等待之前退出同步域。

由 .NET Compact Framework 支持。

WaitHandle.WaitOne (TimeSpan, Boolean) 在派生类中被重写时,阻塞当前线程,直到当前实例收到信号,使用 TimeSpan 度量时间间隔并指定是否在等待之前退出同步域。
 

ntdll!NtWaitForMultipleObjects+0x14: 00007ffc`943d0c24 c3 ret 0:038> k *** WARNING: Unable to verify checksum for Hardcodet.Wpf.TaskbarNotification.dll # Child-SP RetAddr Call Site 00 000000c1`09c3dd28 00007ffc`91706989 ntdll!NtWaitForMultipleObjects+0x14 01 000000c1`09c3dd30 00007ffc`7b8a1636 KERNELBASE!WaitForMultipleObjectsEx+0xe9 02 000000c1`09c3e010 00007ffc`7b8a102a clr!WaitForMultipleObjectsEx_SO_TOLERANT+0x62 03 000000c1`09c3e070 00007ffc`7b8a0e01 clr!Thread::DoAppropriateWaitWorker+0x206 04 000000c1`09c3e160 00007ffc`7b95e183 clr!Thread::DoAppropriateWait+0x7d 05 000000c1`09c3e1e0 00007ffc`78fdfebc clr!WaitHandleNative::CorWaitOneNative+0x153 06 000000c1`09c3e400 00007ffc`79815a0b mscorlib_ni!System.Threading.WaitHandle.InternalWaitOne+0x1c 07 000000c1`09c3e430 00007ffc`663f9c0f mscorlib_ni!System.Threading.WaitHandle.WaitOne+0x4b 08 000000c1`09c3e470 00007ffc`663f98d3 WindowsBase_ni!System.Windows.Threading.DispatcherOperation.DispatcherOperationEvent.WaitOne+0x2f 09 000000c1`09c3e4d0 00007ffc`663d24ac WindowsBase_ni!System.Windows.Threading.DispatcherOperation.Wait+0xb3 0a 000000c1`09c3e510 00007ffc`663d22ab WindowsBase_ni!System.Windows.Threading.Dispatcher.InvokeImpl+0xac 0b 000000c1`09c3e5a0 00007ffc`663d20d9 WindowsBase_ni!System.Windows.Threading.Dispatcher.Invoke+0x14b 0c 000000c1`09c3e620 00007ffc`20afc6bb WindowsBase_ni!System.Windows.Threading.Dispatcher.Invoke+0x39 0d 000000c1`09c3e660 00007ffc`78f91bf8 Hardcodet_Wpf_TaskbarNotification!Hardcodet.Wpf.TaskbarNotification.TaskbarIcon.DoSingleClickAction+0x3b 0e 000000c1`09c3e690 00007ffc`78f91ae5 mscorlib_ni!System.Threading.ExecutionContext.RunInternal+0x108 0f 000000c1`09c3e760 00007ffc`799205a8 mscorlib_ni!System.Threading.ExecutionContext.Run+0x15 10 000000c1`09c3e790 00007ffc`799202f1 mscorlib_ni!System.Threading.TimerQueueTimer.CallCallback+0x138 11 000000c1`09c3e7f0 00007ffc`78f3c338 mscorlib_ni!System.Threading.TimerQueueTimer.Fire+0x91 12 000000c1`09c3e860 00007ffc`7b9712c3 mscorlib_ni!System.Threading.TimerQueue.FireNextTimers+0x78 13 000000c1`09c3e8e0 00007ffc`7b83961b clr!CallDescrWorkerInternal+0x83 14 000000c1`09c3e920 00007ffc`7b888b5a clr!CallDescrWorkerWithHandler+0x47 15 000000c1`09c3e960 00007ffc`7bbf0984 clr!MethodDescCallSite::CallTargetWorker+0xfa 16 000000c1`09c3ea60 00007ffc`7b85230b clr!AppDomainTimerCallback_Worker+0x34 17 000000c1`09c3eb50 00007ffc`7b85222f clr!ManagedThreadBase_DispatchInner+0x33 18 000000c1`09c3eb90 00007ffc`7b8520fb clr!ManagedThreadBase_DispatchMiddle+0x83 19 000000c1`09c3ec80 00007ffc`7b85206f clr!ManagedThreadBase_DispatchOuter+0x87 1a 000000c1`09c3ed10 00007ffc`7bbf08ab clr!ManagedThreadBase_FullTransitionWithAD+0x2f 1b 000000c1`09c3ed70 00007ffc`7bb8597b clr!AppDomainTimerCallback+0x6b 1c 000000c1`09c3edc0 00007ffc`7bbc729b clr!ThreadpoolMgr::AsyncTimerCallbackCompletion+0x6b 1d 000000c1`09c3ee00 00007ffc`7b81078d clr!UnManagedPerAppDomainTPCount::DispatchWorkItem+0x1ab 1e 000000c1`09c3ee90 00007ffc`7b810549 clr!ThreadpoolMgr::ExecuteWorkRequest+0x51 1f 000000c1`09c3eec0 00007ffc`7b9558ea clr!ThreadpoolMgr::WorkerThreadStart+0xe9 20 000000c1`09c3ef50 00007ffc`92ef257d clr!Thread::intermediateThreadProc+0x8a 21 000000c1`09c3fa90 00007ffc`9438af08 kernel32!BaseThreadInitThunk+0x1d 22 000000c1`09c3fac0 00000000`00000000 ntdll!RtlUserThreadStart+0x28 如何分析在等待什么
12-04
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值