-
Aditya Keerthi authored
The Windows Thread Pool API provides a CallbackMayRunLong method to indicate that a callback may not return quickly. The thread pool can use this information to better determine when a new thread should be created. This CL teaches PlatformNativeWorkerPoolWin about ScopedBlockingCall in order to determine whether a callback will return quickly. A BlockingObserver is registered before running a task in the work callback. If the task contains a ScopedBlockingCall, the observer is notified, and will call CallbackMayRunLong on the appropriate PTP_CALLBACK_INSTANCE. Bug: 756547 Change-Id: If04d2c5e01b00960dc510e94ff89525036c2ae67 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1574229 Commit-Queue: François Doray <fdoray@chromium.org> Reviewed-by:
François Doray <fdoray@chromium.org> Cr-Commit-Position: refs/heads/master@{#653252}
e9dec932