Browse Source

3.44

master rel-3.44
Marc Alexander Lehmann 13 years ago
parent
commit
e7a72da868
  1. 6
      Changes
  2. 610
      ev.3
  3. 20
      ev.c
  4. 2
      ev.h
  5. 8
      ev.pod

6
Changes

@ -1,8 +1,8 @@
Revision history for libev, a high-performance and full-featured event loop.
WISH? monotonic clocks times/GetTickCount for coarse corrections?
TODO: use automatic fork for ev_embed.
3.44
3.44 Mon Sep 29 05:18:39 CEST 2008
- embed watchers now automatically invoke ev_loop_fork on the
embedded loop when the parent loop forks.
- new function: ev_now_update (loop).
- verify_watcher was not marked static.
- improve the "associating..." manpage section.

610
ev.3

File diff suppressed because it is too large

20
ev.c

@ -2835,6 +2835,18 @@ embed_prepare_cb (EV_P_ ev_prepare *prepare, int revents)
}
}
static void
embed_fork_cb (EV_P_ ev_fork *fork_w, int revents)
{
ev_embed *w = (ev_embed *)(((char *)fork_w) - offsetof (ev_embed, fork));
{
struct ev_loop *loop = w->other;
ev_loop_fork (EV_A);
}
}
#if 0
static void
embed_idle_cb (EV_P_ ev_idle *idle, int revents)
@ -2864,6 +2876,9 @@ ev_embed_start (EV_P_ ev_embed *w)
ev_set_priority (&w->prepare, EV_MINPRI);
ev_prepare_start (EV_A_ &w->prepare);
ev_fork_init (&w->fork, embed_fork_cb);
ev_fork_start (EV_A_ &w->fork);
/*ev_idle_init (&w->idle, e,bed_idle_cb);*/
ev_start (EV_A_ (W)w, 1);
@ -2880,10 +2895,9 @@ ev_embed_stop (EV_P_ ev_embed *w)
EV_FREQUENT_CHECK;
ev_io_stop (EV_A_ &w->io);
ev_io_stop (EV_A_ &w->io);
ev_prepare_stop (EV_A_ &w->prepare);
ev_stop (EV_A_ (W)w);
ev_fork_stop (EV_A_ &w->fork);
EV_FREQUENT_CHECK;
}

2
ev.h

@ -337,7 +337,7 @@ typedef struct ev_embed
ev_timer timer; /* unused */
ev_periodic periodic; /* unused */
ev_idle idle; /* unused */
ev_fork fork; /* unused */
ev_fork fork; /* private */
} ev_embed;
#endif

8
ev.pod

@ -2244,6 +2244,14 @@ that you cannot get an embeddable loop. The recommended way to get around
this is to have a separate variables for your embeddable loop, try to
create it, and if that fails, use the normal loop for everything.
=head3 C<ev_embed> and fork
While the C<ev_embed> watcher is running, forks in the embedding loop will
automatically be applied to the embedded loop as well, so no special
fork handling is required in that case. When the watcher is not running,
however, it is still the task of the libev user to call C<ev_loop_fork ()>
as applicable.
=head3 Watcher-Specific Functions and Data Members
=over 4

Loading…
Cancel
Save