Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Trac Trac
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Issues 246
    • Issues 246
    • List
    • Boards
    • Service Desk
    • Milestones
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
  • Wiki
    • Wiki
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • Legacy
  • TracTrac
  • Issues
  • #25374
Closed (moved) (moved)
Open
Issue created Feb 27, 2018 by Nick Mathewson@nickm🤹

Create a better-designed system for handling computation outside the event loop

Right now, we do a couple of things in run_main_loop_once that happen outside the event loop (because we want to re-scan for events event loop before they happen):

  • Making events on active_linked_connection_lst active.
  • Running connection_ap_attach_pending.

But we can do this much better. With Libevent 2.1, instead of making the loop exit for this, we can should do all of these things in a separate event callback, and call event_base_loopcontinue() at the end of that event's callback so that the event_base will get rescanned before we return. With earlier versions of Libevent, we can do something similar with event_base_loopbreak().

Doing this won't lower the number of wakeups we do, but it should simplify our overall event loop logic, and make other event loop simplifications easier.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking