Hacker News new | ask | show | jobs
by jancsika 239 days ago
One mildly interesting fact MANY programmers get wrong about the is_computer_on function:

It is threadsafe. The documentation is very clear about this.

2 comments

Could you clarify this analogy? I’m confused
Maybe something about programs being able to skip the 'is there a power cord connected to this PSU?' type jesting?
You could legitimately have a is_computer_on function. Some devices have wake-on-lan type functionality. What about the code involved?