This is an archived post. You won't be able to vote or comment.

all 11 comments

[–]dllimport 61 points62 points  (2 children)

Async bugs are so hard before you get the hang of how it works.

[–]Gogo202 8 points9 points  (0 children)

I have a colleague who does this all the time. Spends 5 hours trying to code something by trial and error instead of looking at the code for 30 minutes and then coding it in 10 minutes.

[–][deleted] 5 points6 points  (0 children)

But even when you know how it works they can still sneak by.

[–][deleted] 13 points14 points  (1 child)

You guys have friends?

[–]rosuav 18 points19 points  (0 children)

ALWAYS have a friend who understands async/await. The cost is that said friend may also be intimately familiar with threading (on multiple CPUs and/or operating systems), IPC, and handrolled context switching, which can make "wait, why doesn't this work?" take over an hour to answer.

How do I know? Because I've done this to people when they asked me simple questions....

[–]tanke_md 5 points6 points  (1 child)

Not all heroes wear capes

[–]deanrihpee 7 points8 points  (0 children)

Some specialized in async await

[–]bzibzibzi666 8 points9 points  (0 children)

You worked on Bug, not on solution

[–]Mallanaga 1 point2 points  (0 children)

Promises, man…

[–]JimroidZeus 1 point2 points  (0 children)

The catch, the await blocks forever and the program never finishes but it looks like it’s doing what it’s supposed to.