Squadrick / shadesmar

Fast C++ IPC using shared memory
MIT License
555 stars 85 forks source link

[RPC] Replace poll with condvar #20

Closed Squadrick closed 3 years ago

Squadrick commented 4 years ago

We can add running stats of time spent waiting under condvar, so that each successive sleep time will be inline with the actual sleeping time. This will prevent sleeping for too longer or waking up too early and wasting CPU cycles doing polls.

Squadrick commented 3 years ago

First commit: 9f4f97458ad461d90584bfb2491e6d4da0c80edd

Squadrick commented 3 years ago

Second commit: 1129b7235496fb28de3ce3e441e3f3c7ddb7f2f9

Squadrick commented 3 years ago

shadesmar/rpc/channel.h now supports sleeping using a condvar instead of polling for server request processing.