TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Javascript asynchronous problems

6 pointsby gringofyxalmost 12 years ago

2 comments

lewispollardalmost 12 years ago
I thought setTimeout was still blocking... Javascript isn't threaded, after all. When you do a setTimeout with a large interval, doesn't it simply keep track of how long it's been since you made the call, and at the appropriate time blocks the current code and runs the function? If so, what difference does using setImmediate/setTimeout(x, 0) make?
评论 #6236445 未加载
semjadaalmost 12 years ago
that explains my issues with <10ms setTimeouts, thanks!