2 ms·
Unrelated anecdote, I once worked in an office where the light switches were powered by the cloud. If you pressed the on and off button at the same time, there
by marginalia_nu 5y ago
Unrelated anecdote, I once worked in an office where the light switches were powered by the cloud. If you pressed the on and off button at the same time, there would be some sort of a race condition and you'd get blinking disco lighting as two threads presumably went
while (!bright) {
increaseBrightnessBy10%();
sleep(100ms);
}
and
while (!dark) {
decreaseBrightnessBy10%();
sleep(100ms);
}
Then someone had to log into a server and reboot a process before the blinking stopped.