mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-09 20:41:27 -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
|
.Sh SYNOPSIS
|
||||||
.Fd #include <sys/time.h>
|
.Fd #include <sys/time.h>
|
||||||
.Fd #include <event.h>
|
.Fd #include <event.h>
|
||||||
.Ft void
|
.Ft "struct event_base *"
|
||||||
.Fn "event_init"
|
.Fn "event_init"
|
||||||
.Ft int
|
.Ft int
|
||||||
.Fn "event_dispatch"
|
.Fn "event_dispatch"
|
||||||
@ -399,6 +399,17 @@ By default,
|
|||||||
assigns the middle priority to all events unless their priority
|
assigns the middle priority to all events unless their priority
|
||||||
is explicitly set.
|
is explicitly set.
|
||||||
.Pp
|
.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
|
.Sh BUFFERED EVENTS
|
||||||
.Nm libevent
|
.Nm libevent
|
||||||
provides an abstraction on top of the regular event callbacks.
|
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_dispatch(void);
|
||||||
int event_base_dispatch(struct event_base *);
|
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_ONCE 0x01
|
||||||
#define EVLOOP_NONBLOCK 0x02
|
#define EVLOOP_NONBLOCK 0x02
|
||||||
int event_loop(int);
|
int event_loop(int);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user