Skip to content

Event loop: microtasks and macrotasks#3303

Open
bogdanbacosca wants to merge 5 commits into
javascript-tutorial:masterfrom
bogdanbacosca:event-loop
Open

Event loop: microtasks and macrotasks#3303
bogdanbacosca wants to merge 5 commits into
javascript-tutorial:masterfrom
bogdanbacosca:event-loop

Conversation

@bogdanbacosca

@bogdanbacosca bogdanbacosca commented Dec 14, 2022

Copy link
Copy Markdown
Contributor

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 :
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

@joaquinelio joaquinelio Dec 14, 2022

Copy link
Copy Markdown
Member

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
Copy Markdown
Member

the engine?
or the code.

@bogdanbacosca

bogdanbacosca commented Dec 14, 2022

Copy link
Copy Markdown
Contributor Author

the engine? or the code.

I'm thinking that the engine interprets the code.

@joaquinelio

Copy link
Copy Markdown
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