WaitHandle.WaitOne(TimeSpan, bool)
第二个参数是指在Wait之前是否退出同步域(synchronization domain),
有没能详细解说一下,究竟有什么作用吗?

解决方案 »

  1.   

    bool exitContext
    如果在等待之前退出上下文的同步域(如果在同步上下文中),然后重新获取它,则为 true;否则为 false。 
      

  2.   

    楼上两位说了也是白说,翻译我是会的,MSDN我看的不少。
    我就是看了不明白才问。
    我想问的就是什么叫"退出同步域",作用表现是怎么样,什么又叫重新获取同步域。
    不好意思,这样确实不值得给分啊。
      

  3.   

    a set of context-bound objects which share a lock (through SynchronizationAttribute) are said to be in a synchronization domainif a client is calling any object in the synchronization domain, it needs to acquire this lock, once the lock is acquired, no other clients can access any object in the synchronization domainIf this client calls WaitOne, it has a choice to stay in the synchronization domain (with the second parameter exitContext set to false), so it will keep the lock (then no other clients can access any object in the domain during the waiting period), or it can leave the synchronization domain (with the second parameter exitContext set to true) and the system will release the lock, so other clients can access the objects in the synchronization domain