Changeset 821 for pjproject/trunk/pjlib/src/pj/ioqueue_winnt.c
- Timestamp:
- Nov 23, 2006 7:31:27 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjlib/src/pj/ioqueue_winnt.c
r599 r821 688 688 } 689 689 #endif 690 691 #if PJ_IOQUEUE_HAS_SAFE_UNREG 692 /* Mark key as closing before closing handle. */ 693 key->closing = 1; 694 #endif 690 695 691 696 /* Close handle (the only way to disassociate handle from IOCP). … … 702 707 703 708 #if PJ_IOQUEUE_HAS_SAFE_UNREG 704 /* Mark key as closing. */705 key->closing = 1;706 707 /* Decrement reference counter. */708 decrement_counter(key);709 710 709 /* Even after handle is closed, I suspect that IOCP may still try to 711 710 * do something with the handle, causing memory corruption when pool … … 715 714 * an ugly solution.. 716 715 */ 717 pj_thread_sleep(0); 716 while (pj_atomic_get(key->ref_count) != 1) 717 pj_thread_sleep(0); 718 719 /* Decrement reference counter to destroy the key. */ 720 decrement_counter(key); 718 721 #endif 719 722
Note: See TracChangeset
for help on using the changeset viewer.