Skip to content

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
  • Loading branch information
iliakan committed Jul 1, 2019
1 parent 36bf2af commit 5c56e0d
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 1 deletion.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion 2-ui/4-forms-controls/3-events-change-input/article.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Events: change, input, cut, copy, paste

Let's discuss various events that accompany data updates.
Let's cover various events that accompany data updates.

## Event: change

Expand Down
10 changes: 10 additions & 0 deletions 2-ui/99-ui-misc/03-event-loop/article.md
Original file line number Diff line number Diff line change
Expand Up @@ -337,3 +337,13 @@ To schedule a new microtask:
There's no UI or network event handling between microtasks: they run immediately one after another.

So one may want to `queueMicrotask` to execute a function asynchronously, but also with the same application state.

```smart header="Web Workers"
For long heavy calculations that shouldn't block the event loop, we can use [Web Workers](https://html.spec.whatwg.org/multipage/workers.html).
That's a way to run code in another, parallel thread.
Web Workers can exchange messages with the main process, but they have their own variables, and their own event loop.
Web Workers do not have access to DOM, so they are useful, mainly, for calculations, to use multiplle CPU cores simultaneously.
```
Binary file modified figures.sketch
Binary file not shown.

0 comments on commit 5c56e0d

Please sign in to comment.