documentation on thread safe events

svn:r126
This commit is contained in:
Niels Provos 2004-12-01 20:10:16 +00:00
parent 256460459e
commit cacd83983f
2 changed files with 15 additions and 1 deletions

13
event.3
View File

@ -73,7 +73,7 @@
.Sh SYNOPSIS
.Fd #include <sys/time.h>
.Fd #include <event.h>
.Ft void
.Ft "struct event_base *"
.Fn "event_init"
.Ft int
.Fn "event_dispatch"
@ -399,6 +399,17 @@ By default,
assigns the middle priority to all events unless their priority
is explicitly set.
.Pp
.Sh THREAD SAFE EVENTS
.Nm Libevent
has experimental support for thread-safe events.
When initializing the library via
.Fn event_init ,
an event base is returned.
This event base can be used in conjunction with calls to
.Fn event_base_set
and
.Fn event_base_dispatch .
.Pp
.Sh BUFFERED EVENTS
.Nm libevent
provides an abstraction on top of the regular event callbacks.

View File

@ -129,6 +129,9 @@ void *event_init(void);
int event_dispatch(void);
int event_base_dispatch(struct event_base *);
/* Associate a different event base with an event */
int event_base_set(struct event_base *, struct event *);
#define EVLOOP_ONCE 0x01
#define EVLOOP_NONBLOCK 0x02
int event_loop(int);