Why Nostr? What is Njump?
2024-08-26 18:20:46

Lars Wirzenius on Nostr: I have known at least since the mid-1990s that a "sleep 1" in a test suite to make ...

I have known at least since the mid-1990s that a "sleep 1" in a test suite to make sure a background process has time to run before I check that it has done its thing, is not reliable. It's a trap. It's a test failure waiting to happen.

I keep doing that. I keep getting caught in the trap.

The better pattern is to "wait for up to quite a long time and keep checking if the background process has done its thing every so often, but not to often". That's just more work to implement.
Author Public Key
npub1kyxuruufugedgvtr37dtteresx93h743jltzussvzu967zlvp89sv3eaz2