• Yingnan Li's avatar
    Use ExecutionObserver in EventBase to monitor function not executed... · 204ae3a6
    Yingnan Li authored
    Use ExecutionObserver in EventBase to monitor function not executed EventBaseAtomicNotificationQueueby in EventBase
    
    Summary:
    Our service schedules tasks (eSemiFuture/coroutine) on SerialExecutor on top of IOThreadPoolExecutor. When using EventBaseWatchdog to locate long running tasks, I found some long running tasks were not observed by PerThreadExecController. After some investigation, I found there are 2 cases in EventBase that tasks are not executed by handlerReady in EventBaseAtomicNotificationQueue.
    
    1. Short-circuit scenario in runInEventBaseThread which bypasses EventBaseAtomicNotificationQueue.
    2. If notification Queue is marked 'internal', some events may be ran "manually" in loopBody.
    
    As a result, the observer logic in EventHandler (EventBaseAtomicNotificationQueue derives from EventHandler) is passed.
    
    Reviewed By: andriigrynenko
    
    Differential Revision: D26563459
    
    fbshipit-source-id: e2741cff373c89a5cd438904f910b23a64fad653
    204ae3a6
EventBaseTestLib.h 72 KB