Skip to content

Commit

Permalink
Updated README for capturing synchronization context
Browse files Browse the repository at this point in the history
  • Loading branch information
sacOO7 committed Feb 12, 2023
1 parent 7f5ba61 commit 1fa9235
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -265,12 +265,10 @@ encryptedChannel.Publish("name (not encrypted)", "sensitive data (encrypted befo
```

### Executing callbacks on Main/UI thread
- The library creates a number of threads and all callbacks are executed on non UI threads.
- This makes it difficult to update UI elements inside any callback executed by Ably.
- To make it easier we support capturing the `SynchronizationContext` and synchronizing callbacks to the Main/UI thread.
- The library creates a number of threads and all listeners/callbacks are executed on non UI threads.
- To execute listeners/callbacks on the Main/UI thread, we support capturing the `SynchronizationContext`.

```
options.CaptureCurrentSynchronizationContext = true;
options.CustomContext = SynchronizationContext.Current;
```

Expand Down

0 comments on commit 1fa9235

Please sign in to comment.