We have already stated that IOCP is nothing but a thread synchronization object, similar to a semaphore, therefore IOCP is not a sophisticated concept.
我们已经知道,IOCP仅仅是一个线程同步对象,有点像信号量(semaphore),因此IOCP并不是一个难懂的概念。
We have already stated that IOCP is nothing but a thread synchronization object, similar to a semaphore, therefore IOCP is not a sophisticated concept.
我们已经说过,IOCP只不过是线程同步对象,类似的信号,因此IOCP不是一个复杂的概念。
When the synchronization object is used in one of the wait functions, the wait function blocks the calling thread until the state of the synchronized object is set to signaled.
当在一个等待函数中使用同步对象时,等待函数就会阻塞调用线程,直到同步对象的状态被设置为有信号为止。
In the absence of synchronization, it is possible to see an up-to-date value for an object reference that was written by another thread and still see stale values for that object's state.
在缺乏同步的情况下,可能会遇到某个对象引用的更新值(由另一个线程写入)和该对象状态的旧值同时存在。
The synchronization lock for the target object is released, but all other locks held by the thread are retained.
释放目标对象的同步锁,但是除此之外的其他锁依然由该线程持有。
You code might set a flag or an internal synchronization object (such as event) so that main thread code would eventually notice it and proceed with raising an external event from there.
你的代码可能设置一个标志或内部同步对象(如事件)使主线程的代码最终会注意到它,并继续从那里筹集外部事件。
Also, if there is a chance that more than one thread might delete the object, the merged approach might not always work. In this situation, it is better to maintain separate synchronization objects.
同时,如果存在超过一个线程会删除对像,这种合并的方法可能会工作异常,在这种情况下,最好是分开维护同步对像。
Also, if there is a chance that more than one thread might delete the object, the merged approach might not always work. In this situation, it is better to maintain separate synchronization objects.
同时,如果存在超过一个线程会删除对像,这种合并的方法可能会工作异常,在这种情况下,最好是分开维护同步对像。
应用推荐