SF: Remove ConnectionHandle concept in Scheduler
This abstraction never made sense, and only incurs pointless locking and hash map lookups. This is a step toward replacing the two EventThreads with a single EventDispatcher. Start the Scheduler's timers after initialization. This solves the same bug as Ib2617b914145bc4180cc7ca27203c59dbd625c94, which avoided crashes without fixing the root cause of the race. In a few cases, initScheduler indirectly calls Scheduler functions that attempt EventThread dispatch before EventThread creation, so skip those EventThread accesses using hasEventThreads for now. Further refactoring will untangle circular dependencies and remove hasEventThreads. Bug: 241285191 Bug: 241285945 Test: presubmit Change-Id: I89b93b47540ab24bb5675edc79370f38bc48114f
Loading
Please register or sign in to comment