You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think it would be nice to have a lint that warns like this
asyncfunctiondoStuff(){Deno.readTextFileSync("")// warning here: using a sync function inside an async function, this blocks deno event loop, you should consider changing it to an async function }
Don't know how this stuff is implemented, but I imagine that sync function blocks tokio executor, so no other async function will proceed, here is an example program that showcases my assumption
setInterval(()=>console.log(4),1000);//Deno.readTextFileSync("/dev/random"); // if this is uncommented, no logging will be printed//await Deno.readTextFile("/dev/random"); // if this is uncommneted, logging will still work
The text was updated successfully, but these errors were encountered:
I think it would be nice to have a lint that warns like this
Don't know how this stuff is implemented, but I imagine that sync function blocks tokio executor, so no other async function will proceed, here is an example program that showcases my assumption
The text was updated successfully, but these errors were encountered: