« first day (1702 days earlier)      last day (1154 days later) » 

9:07 AM
lol I had a 3s sleep in an inner loop which gets called 4 times, there we go 12s xD
I wonder why I had that there
 
 
7 hours later…
3:57 PM
@Hakaishin This is generally a bad idea...
honestly the system should give a hard warning anytime someone uses a sleep
 
Nah for example I need it at the beginning, so that some subscribers can connect to the publishers so it does make sense. Just that particular one was useless
 
4:21 PM
@Hakaishin Whenever sleep is found in code, it is a red flag that there is probably a bug. If your subscriber and publishers are different threads, then it is definitively a bug. sleep is not a synchronization primitive. If they are different processes that don't otherwise communicate, then it may be a possible way of implementing a timeout, but even in that case sleep is not abortable. Meaning that even if it usable in that context, it is still a very bad way of doing it.
At its best, sleep is a bad solution and usually it is doesn't actually fix anything and simply makes the problem it was meant to fix harder to solve.
 

« first day (1702 days earlier)      last day (1154 days later) »