Menu

#73 Alter logic when adding delete events to the changelist

For_2.1
closed-accepted
nobody
None
5
2010-12-16
2010-07-19
No

This is a more speculative patch that follows on from my previous 100% cpu usage patch to event_changelist_del

As far as I can see, the add,delete, dispatch case described in the original comment will never happen. The recorded change is a single operation, not a queue. This seems to leave actions to delete events that never existed as the real targets for converting to no-ops (although it looks like both epoll and kqueue deal with this case possibly making the whole check redundant).

I've changed the logic in event_changelist_del again... this time it only uses change->old_events when deciding whether to convert a delete into a no-op.

I haven't done anything about the case where we try to add an event that already exists.

Discussion

  • Nick Mathewson

    Nick Mathewson - 2010-07-19

    I like this one, but it doesn't fix an actual bug, I think: it only simplifies the existing logic. Is that right? If so, it should wait until Libevent 2.1, since we're trying to minimize non-bugfix changes in Libevent 2.0.

    (Libevent 2.1 should fork off some time in the next month or so.)

    Other than that, this patch _does_ look right, and should go in.

     
  • Nick Mathewson

    Nick Mathewson - 2010-12-16

    Merged as the first patch in Libevent 2.1.0-alpha-dev.

     
  • Nick Mathewson

    Nick Mathewson - 2010-12-16
    • milestone: --> For_2.1
    • status: open --> closed-accepted
     
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.