← Back to context

Comment by CyberDildonics

17 hours ago

How often does a video game really need a lock that can be shared between processes,

That seems hugely useful for interprocess communication and I can immediately think of reasons to use IPC in a game. Having a separate voice process for one.

But that goes back to "how often". Not how many games use it, but how many times per second they use it. You might touch your voice process lock once per frame? That's negligible in terms of CPU time. Any half-reasonable overhead makes no difference in that lock, but might have a big impact in a more common lock.

  • It absolutely can make a difference because if you have locks that are supposed to sync or wake up other processes you care about latency not cpu usage.

    • What specifically are you saying can make a difference?

      I'm saying that extra overhead from making your lock work across processes should be very tiny. That overhead shouldn't add much more than a microsecond in either latency or CPU usage, compared to an in-process lock.

      2 replies →