Skip to content

Commit

Permalink
Add section on sending changes from main thread to worker
Browse files Browse the repository at this point in the history
  • Loading branch information
psrpinto committed Mar 2, 2023
1 parent b0f640b commit d5bb3ad
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion doc/implementation planning/sync-in-worker.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export class SyncWorker {
}
```

## Communicating *side effects* of sync
## Propagating sync changes

The sync process happens roughly as follows:

Expand Down Expand Up @@ -130,3 +130,6 @@ export class SyncProxy extends Sync {
}
}
```

## No need to send changes from main thread to worker
When an action happens in the main thread (sending a message, creating a room, etc), there is no need to communicate that change to the worker or other windows/tabs/iframe, as that change would be retrieved in the next sync, and then propagated as described in the previous section.

0 comments on commit d5bb3ad

Please sign in to comment.