Skip to content

Latest commit

 

History

History
77 lines (74 loc) · 10.1 KB

CONTRIBUTING.md

File metadata and controls

77 lines (74 loc) · 10.1 KB

Design Overview

┌─────────────┐   ┌────────────┐                             ┌────────────┐   ┌─────────────────────┐
│             ├───►            │                             │            ├───►                     │
│ host thread │   │            │                             │            │   │ compilation isolate │
│             ◄───┤            │         write stdin         │            ◄───┤                     │
└─────────────┘   │    ruby    ├─────────────────────────────►    dart    │   └─────────────────────┘
                  │            │      from host threads      │            │
┌─────────────┐   │    sass    │                             │    sass    │   ┌─────────────────────┐
│             ├───►            │                             │            ├───►                     │
│     ...     │   │  embedded  │                             │  embedded  │   │         ...         │
│             ◄───┤            │                             │            ◄───┤                     │
└─────────────┘   │    host    │                             │  compiler  │   └─────────────────────┘
                  │            │         read stdout         │            │
┌─────────────┐   │ dispatcher ◄─────────────────────────────┤ dispatcher │   ┌─────────────────────┐
│             ├───►            │      on polling thread      │            ├───►                     │
│ host thread │   │            │                             │            │   │ compilation isolate │
│             ◄───┤            │                             │            ◄───┤                     │
└─────────────┘   └────────────┘                             │            │   └─────────────────────┘
                                                             │            │
┌─────────────┐                                              │            │
│             │                          read stderr         │            │
│ ruby stderr ◄──────────────────────────────────────────────┤            │
│             │                       on polling thread      │            │
└─────────────┘                                              └────────────┘

Host Dispatcher State Diagram

┌───────────────────┐                                                            ┌─────────┐
│                   │                                                            │         │
│   Initialize...   │                                        ┌───────────────────►  Close  │
│                   │                                        │                   │         │
└─────────┬─────────┘                                        │                   └─────────┘
          │                                              Yes │
          │                                      ┌───────────┴──────────┐        ┌─────────┐
┌─────────▼─────────┐                         No │                      │    Yes │         │
│                   ◄────────────────────────────┤  id == 0xFFFFFFFF ?  ◄────────┤  Idle?  ◄──────────┐
│  id = 0x00000001  │                            │                      │        │         │          │
│                   ├───────────────┐            └──────────────────────┘        └─────────┘          │
└───────────────────┘               │                                                                 │
                       ┌────────────▼─────────