mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-08 03:44:22 -04:00
documentation on thread safe events
svn:r126
This commit is contained in:
parent
256460459e
commit
cacd83983f
13
event.3
13
event.3
@ -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.
|
||||
|
3
event.h
3
event.h
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user