Skip to content

Event loop: microtasks and macrotasks #3303

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

bogdanbacosca
Copy link
Contributor

@bogdanbacosca bogdanbacosca commented Dec 14, 2022

Made a few minor improvements in grammar here and there:

line 45: the update potentially improves legibility
line 53: added the engine to be more concise
line 263: removed , because it was placed before and
line 323: added missing :

improved readability
minor improvement in describing the flow of ideas
no , before the word and. Reads `.then` runs after current core.
fixed missing :
@@ -42,15 +42,15 @@ So far, quite simple, right?

Two more details:
1. Rendering never happens while the engine executes a task. It doesn't matter if the task takes a long time. Changes to the DOM are painted only after the task is complete.
2. If a task takes too long, the browser can't do other tasks, such as processing user events. So after a time, it raises an alert like "Page Unresponsive", suggesting killing the task with the whole page. That happens when there are a lot of complex calculations or a programming error leading to an infinite loop.
2. If a task takes too long, the browser can't do other tasks, such as processing user events. So after a time, it raises an alert like "Page Unresponsive", suggesting killing the task with the whole page. That happens when a lot of complex calculations take place or when a programming error leads to an infinite loop.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning
I'm non native

maybe

Suggested change
2. If a task takes too long, the browser can't do other tasks, such as processing user events. So after a time, it raises an alert like "Page Unresponsive", suggesting killing the task with the whole page. That happens when a lot of complex calculations take place or when a programming error leads to an infinite loop.
2. If a task takes too long, the browser can't do other tasks, such as processing user events. So after a time, it raises a "Page Unresponsive" alert, suggesting to kill the task along the whole page. That happens when a lot of complex calculations take place or when a programming error leads to an infinite loop.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about the task along with the whole page ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i dont like "with" there.
"coffee with sugar"

"along" (HOPING Im ok) is "extending to", like
"you kill the task, and the whole page with it"
mmm...
this can be an option too ..

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I THINK it s not legibility but grammar
like "leads" instead of "leading"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

About along with
It can be used to mean:

  1. together with
  2. in addition to

this can be an option too

Yeah there are more ways to describe the same thing suggesting to kill the task and the whole page with it. could also work.

Copy link
Member

@joaquinelio joaquinelio Dec 14, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

YES

my bad, I got it wrong.
I thought you were asking why "along"
but you were actually fixing it "along with"

Looks ok now I guess...

...
well, if Ilya likes the whole thing.

taking the PR comments into account
@joaquinelio
Copy link
Member

the engine?
or the code.

@bogdanbacosca
Copy link
Contributor Author

bogdanbacosca commented Dec 14, 2022

the engine? or the code.

I'm thinking that the engine interprets the code.

@joaquinelio
Copy link
Member

the engine? or the code.

I'm thinking that the engine interprets the code.

hard to explain...
it's about levels of abstraction...
can't think better I'll drop it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants