On Tue, Sep 09, 2008 at 04:48:40PM -0500, Andrew Troschinetz wrote:
Hi all,
I'm just getting started with libevent and I was wondering how I might
implement a simple deadline timer with it.
I'd like to be able to use do something like:
void do_something(...) ...
1. Make EV_PERSIST reschedule timeouts automatically.
2. New function: timeout_schedule: (nothing really new within it, just
modular wrapping of timeout rescheduling).
3. New macro: evutil_timercpy: tv_dst = tv_src in one line type deal;
3. Regression tests for persistent timeouts, include
On Tue, Nov 13, 2007 at 06:27:58PM -0800, William Ahern wrote:
event_set(ev, fd, EV_READ | EV_PERSIST, read_cb, obj);
event_add(ev, timeout);
read_cb() will be called whenever a read event happens, and it's timeout
as passed to event_add() will be reset to the original value you
Index: test/Makefile.am
===
--- test/Makefile.am(revision 515)
+++ test/Makefile.am(working copy)
@@ -31,6 +31,6 @@
test: test-init test-eof test-weof test-time regress
verify: test
- @./test.sh
+
event_del() calls event_queue_remove(base, ev, EVLIST_TIMEOUT).
-cl
Index: event.c
===
--- event.c (revision 515)
+++ event.c (working copy)
@@ -815,7 +815,6 @@
while ((ev = min_heap_top(base-timeheap))) {
On Mon, Nov 12, 2007 at 06:38:33AM +0100, Marc Lehmann wrote:
On Fri, Nov 09, 2007 at 12:39:37AM +0100, Hannah Schroeter [EMAIL
PROTECTED] wrote:
I see less problems with the writing away of the data sucked from the
web servers, as most Unix like systems write stuff asynchronously, so
the
1. Fix a debugging call with wrong format, (we should probably use
__attr__((format(printf))) eventually).
2. Add additional debugging calls for sanity.
-cl
Index: signal.c
===
--- signal.c(revision 507)
+++ signal.c(working
[ WARNING: Long and ardorous - difficult to trace behaviour ]
Behaviour described is without EV_PERSIST on internal signal handler (as it's
been for months):
1. signal comes in, we jump to our internal signal handler, it writes to pipe.
2. epoll_wait() returns -1/EINTR because a signal handler
On Sat, Nov 10, 2007 at 06:44:12PM -0800, Christopher Layne wrote:
11. here's the funny part: evsignal_process() increments event_count_active -
but since our
should be:
evsignal_process() adds the internal event to the active queue as normal.
before we call event_process_active
On Sat, Nov 10, 2007 at 06:49:58PM -0800, Christopher Layne wrote:
On Sat, Nov 10, 2007 at 06:44:12PM -0800, Christopher Layne wrote:
11. here's the funny part: evsignal_process() increments event_count_active
- but since our
Here's a better patch:
This removes docount entirely. docount
On Fri, Nov 09, 2007 at 04:03:46PM -0800, Scott Lamb wrote:
Christopher Layne wrote:
+/* save previous handler setup */
+if (sigaction(evsignal, NULL, sig-sa_old[evsignal]) == -1
+|| sigaction(evsignal, sa, NULL) == -1)
Not worth changing unless you're redoing the patch
Separate build dir issue.
Index: sample/Makefile.am
===
--- sample/Makefile.am (revision 506)
+++ sample/Makefile.am (working copy)
@@ -1,7 +1,7 @@
AUTOMAKE_OPTIONS = foreign no-dependencies
LDADD = ../libevent.la
-AM_CFLAGS =
On Sun, Nov 04, 2007 at 12:15:56PM -0800, Steven Grimm wrote:
On Nov 4, 2007, at 8:13 AM, Marc Lehmann wrote:
This would create additional loops (event_bases). The difference is
that
these cannot handle signals (or child watchers) at all, with the
default loop
being the only one to do
On Mon, Nov 05, 2007 at 02:42:16AM +0100, Marc Lehmann wrote:
On Sun, Nov 04, 2007 at 05:19:36PM -0800, Christopher Layne [EMAIL
PROTECTED] wrote:
Not to put on my O-face, but binary heap insert is *average* O(1). There
should be a performance win for libevent, when it comes to timer
On Mon, Nov 05, 2007 at 02:46:36AM +0100, Marc Lehmann wrote:
On Sun, Nov 04, 2007 at 04:09:08PM -0800, Scott Lamb [EMAIL PROTECTED]
wrote:
Have you seen the new Linux timerfd API? Where available, you can wait
for CLOCK_MONOTONIC and CLOCK_REALTIME events independently. Beats
heuristics,
On Sat, Nov 03, 2007 at 04:56:07PM -0700, Niels Provos wrote:
Try
#include sys/queue.h
before including evhttp.h
Niels.
Why is this a usercode issue? Shouldn't evhttp.h be more interested in
handling it's dependencies than non-event parent code? It's similar to the
sys/time.h being a
On Sat, Nov 03, 2007 at 05:53:42PM -0700, Niels Provos wrote:
Well, Rob Pike has many great insights. He also does not like
conditional compilation. However, you are right, evhttp.h could
resolve the dependency on queue.h internally. I will look into it.
Agreed, Rob Pike is true blue - and
On Thu, Sep 27, 2007 at 08:31:32AM -0700, Niels Provos wrote:
Hi Christopher,
I am not sure if this is necessarily the right way to go for a
library, esp if it can impact backwards compatibility for
bufferevents. As for reducing the size of the library, do you really
think that 30K make a
$ ./configure --help
[...]
Optional Features:
[...]
--enable-dnsbuild with support for dns layer [default=yes]
--enable-http build with support for http layer [default=yes]
--enable-beventsbuild with support for buffer events [default=yes]
Changes:
1. This
On Thu, Sep 20, 2007 at 01:52:31PM +0200, Trond Norbye wrote:
The result of gettime is not used if the timetree is empty (and might
cause a context switch to get the system clock).
--Trond
Index: event.c
===
--- event.c
1. event_rpcgen.py will fail to open regress.rpc if building outside the source
directory.
-cl
--
Index: Makefile.am
===
--- Makefile.am (revision 433)
+++ Makefile.am (working copy)
@@ -18,7 +18,7 @@
bench_SOURCES = bench.c
Compilation errors in http.c and a segfault during make verify when
USE_DEBUG is defined.
Index: libevent/http.c
===
--- libevent/http.c (revision 429)
+++ libevent/http.c (working copy)
@@ -1174,7 +1174,7 @@
if
On Thu, Jul 19, 2007 at 01:14:58PM -0700, Scott Lamb wrote:
When I use valgrind --tool=memcheck on a libevent-based program, it
gives the following complaint:
==15442== Conditional jump or move depends on uninitialised value(s)
==15442==at 0x4C0F2D3: event_add (event.c:632)
==15442==
On Tue, May 08, 2007 at 06:38:51PM -0700, William Ahern wrote:
received a non-timeout event. In a way this is absolute, not in the epoch
sense, but that it's tied to the time event_add() was called and not
relative
to when the last valid event was received.
That may or may not make
24 matches
Mail list logo