[Swan-dev] pluto: replace idiom delete_event(); event_schedule_s(,0,) with event_force()

Andrew Cagney andrew.cagney at gmail.com
Sun Jun 3 14:30:04 UTC 2018


There are also plenty of cases of: delete event(); event schedule(st,
... later) so what about a more general:
    state_event_replace(..., delta_now);
(yea, I'm adding a state prefix since I understand all these events
are tied to a state).

(I'd keep clear of pluto_event_now(), it has to handle cross-thread calls)


On 2 June 2018 at 20:09, D. Hugh Redelmeier <hugh at mimosa.com> wrote:
> | From: Paul Wouters <paul at nohats.ca>
>
> | D. Hugh Redelmeier <hugh at mimosa.com> wrote:
> |
> | | > commit 2efd341909033b9f83e027ebaaea1f4c2e0e7348
> | | > Author: D. Hugh Redelmeier <hugh at mimosa.com>
> | | >
> | | >    pluto: replace idiom delete_event(); event_schedule_s(,0,) with
> | | >    event_force()
> |
> | But nothing is "forced" here. It is really a re-scheduling of an event.
> |
> | So maybe the name event_replace() or replace_event() is a better name?
>
> I think that it is forced: discard the next event; do this event; do
> it now.  Not much of a window for the system to have second thoughts.
>
> The name event_replace does not suggest that the event is to be
> scheduled for now.  I guess event_force only weakly suggests it.
>
> My original name had "now" in it, but that got confusing with
> struct now_event logic.
> _______________________________________________
> Swan-dev mailing list
> Swan-dev at lists.libreswan.org
> https://lists.libreswan.org/mailman/listinfo/swan-dev


More information about the Swan-dev mailing list