|
|
|
|
|
by galaxyLogic
2239 days ago
|
|
In sync programming if your function does the wrong thing you typically get an error thrown or you get a result which you check for its correctness. But when you call an async-function that is supposed to do something like say write to a file or database maybe there is an error which makes it never do its job, and never call the callback you gave it. But the rest of your program just hums along happily. There is no error. The error does not "happen" but the error is that "something did NOT happen". And when something does not happen you don't get an error or notification saying that something did not happen. You run your program but expected results do not show up in database. But you don't know why, because the problem is that some of your async functions did NOT call something they should have called. It's hard to detect that something does not happen. Some kind of built-in support for callback-timeouts might alleviate this problem. |
|