• Andreas Haas's avatar
    [platform] Add TaskRunner to the platform API · c690f54d
    Andreas Haas authored
    With the existing platform API it is not possible to post foreground
    tasks from background tasks. This is, however, required to implement
    asynchronous compilation for WebAssembly. With this CL we add the
    concept of a TaskRunner to the platform API. The TaskRunner contains
    all data needed to post a foreground task and can be used both from a
    foreground task and a background task. Eventually the TaskRunner should
    replace the existing API.
    
    In addition, this CL contains a default implementation of the
    TaskRunner. This implementation has tempory workaround for platforms
    which do not provide a TaskRunner implementation yet. This default
    implementation should be deleted again when all platforms provide a
    TaskRunner implementation.
    
    R=rmcilroy@chromium.org
    
    Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
    Change-Id: I6ea4a1c9da1eb9a19e8ce8f2163000dbc2598802
    Reviewed-on: https://chromium-review.googlesource.com/741588
    Commit-Queue: Andreas Haas <ahaas@chromium.org>
    Reviewed-by: 's avatarRoss McIlroy <rmcilroy@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#49041}
    c690f54d
v8-platform.h 10.1 KB