Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: flutter/engine
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: c52b3033eca6
Choose a base ref
...
head repository: flutter/engine
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 9cbca80e2196
Choose a head ref
  • 1 commit
  • 36 files changed
  • 1 contributor

Commits on Mar 4, 2024

  1. Experimental platform isolates API (#48551)

    This is a prototype of the [PlatformIsolate
    API](flutter/flutter#136314).
    
    **UPDATE (Jan 25):** The PR is ready for review. PTAL.
    
    The `PlatformIsolate` creation flow is:
    
    1. `PlatformIsolate.spawn` running on parent isolate
    (platform_isolate.dart)
        a. Create `isolateReadyPort`
        b. `PlatformIsolateNativeApi::Spawn` (platform_isolate.cc)
        c. `DartIsolate::CreatePlatformIsolate` (dart_isolate.cc)
    d. Isolate created. Entry point invocation task dispatched to platform
    thread
        e. `PlatformIsolate.spawn` returns a `Future<Isolate>`
    2. On the platform thread, `_platformIsolateMain` is invoked in the
    platform isolate
        a. Create `entryPointPort`
    b. Send `Isolate.current` metadata and `entryPointPort` back to the
    parent isolate via `isolateReadyPort`
    3. Back in the parent isolate, `isolateReadyPort.handler` is invoked
    a. Send the user's `entryPoint` and `message` to the platform isolate
    via `entryPointPort`
    b. Use received isolate metadata to create a new `Isolate` representing
    the platform isolate and complete the `Future<Isolate>`
    4. In the platform isolate, `entryPointPort.handler` is invoked
        a. Run the user's `entryPoint(message)`
    
    The engine shutdown flow is handled by `PlatformIsolateManager`, which
    maintains a set of running platform isolates.
    liamappelbe authored Mar 4, 2024
    Configuration menu
    Copy the full SHA
    9cbca80 View commit details
    Browse the repository at this point in the history
Loading