wraptile on Nostr: npub1n8jea…50xek callbacks don't wait for result. It tells the async loop to do the ...
npub1n8jeap4h9qtf20039ah09evr45ykgsk3m6ckc0eqjyqpls49yvwsm50xek (npub1n8j…0xek) callbacks don't wait for result. It tells the async loop to do the task in the background and callback/errorback function when it's complete. So for example if your function needs an analytics call `await doAnalytics()` would block and `doAnalytics().then(reportResultToSentry)` would schedule the task and do it in the background. It can be very practical but notoriously difficult to debug to the point where we invented async/await because it sucked so bad :D
Published at
2024-02-09 09:16:15Event JSON
{
"id": "64f95d3fe189b43bc5761bb8ca6dcbf4b5178737baaadb446848c7ac6d05d22c",
"pubkey": "344e5688f8a1aa81469ea7a8a7b7e32b7741844202f744e0e16640b1074ec554",
"created_at": 1707470175,
"kind": 1,
"tags": [
[
"p",
"99e59e86b72816953df12f6ef2e583ad096442d1deb16c3f2091001fc2a5231d",
"wss://relay.mostr.pub"
],
[
"p",
"5f907109b1c9fc681cd7f81db43ca1cc9c57530e2dc5c3e6674aed30f907e9e3",
"wss://relay.mostr.pub"
],
[
"e",
"2222c7d78a9dce1c25a08207b0490b41fc6777d9b96530c21170d847dc692591",
"wss://relay.mostr.pub",
"reply"
],
[
"proxy",
"https://fosstodon.org/users/wraptile/statuses/111900765412576086",
"activitypub"
]
],
"content": "nostr:npub1n8jeap4h9qtf20039ah09evr45ykgsk3m6ckc0eqjyqpls49yvwsm50xek callbacks don't wait for result. It tells the async loop to do the task in the background and callback/errorback function when it's complete. So for example if your function needs an analytics call `await doAnalytics()` would block and `doAnalytics().then(reportResultToSentry)` would schedule the task and do it in the background. It can be very practical but notoriously difficult to debug to the point where we invented async/await because it sucked so bad :D",
"sig": "e7eacd5a1aedd6c515912381121722e82931d2e183ec0c36f1992402695b16c37a5455af89a78455fe68e7f9d5144918c3bcb40fb91ba4d08f72ecd0e6fd9c4c"
}