diff options
author | Christopher Davis <chrisd@torproject.org> | 2010-08-17 05:02:00 -0700 |
---|---|---|
committer | Christopher Davis <chrisd@torproject.org> | 2010-09-08 01:22:22 -0700 |
commit | 76f7e7ae745ad730795f0a4a3bc1299a00137cc2 (patch) | |
tree | 5327da1a718cc561e989fee28af0bbafc2e2ee92 /event_iocp.c | |
parent | d844242f9b138be4896942ded25d74a91bf29901 (diff) | |
download | libevent-76f7e7ae745ad730795f0a4a3bc1299a00137cc2.tar.gz |
Some IOCP bufferevent tweaks.
- Increment reference count of bufferevents before initiating overlapped
operations to prevent the destructor from being called while operations
are pending. The only portable way of canceling overlapped ops is to
close the socket.
- Translate error codes to WSA* codes.
- Better handling of errors.
- Add an interface to add and del "virtual" events. Because IOCP
bufferevents don't register any events with the base, the event loop
has no way of knowing they exist. This causes the loop to terminate
prematurely. event_base_{add,del}_virtual increment/decrement base's
event count so the loop runs while there are any enabled IOCP
bufferevents.
Diffstat (limited to 'event_iocp.c')
-rw-r--r-- | event_iocp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/event_iocp.c b/event_iocp.c index 82fa9aee..19c7bffc 100644 --- a/event_iocp.c +++ b/event_iocp.c @@ -36,6 +36,7 @@ #include "log-internal.h" #include "mm-internal.h" #include "event-internal.h" +#include "evthread-internal.h" #define NOTIFICATION_KEY ((ULONG_PTR)-1) @@ -277,4 +278,3 @@ event_base_get_iocp(struct event_base *base) return NULL; #endif } - |