goldsborough / ipc-bench

:racehorse: Benchmarks for Inter-Process-Communication Techniques
MIT License
687 stars 108 forks source link

working version shm-sync #18

Open AlexBurnes opened 4 years ago

AlexBurnes commented 4 years ago

fix two troubles with using pthread process shared

  1. need initialize mutex and condition variable only once at server process for example
  2. fix signal and wait functions on shared mutex and condition according to example in man https://linux.die.net/man/3/pthread_mutexattr_init section 'Process Shared Memory and Synchronization'

this solution has issue: client must start with some delay before server process is initilized shared segment and mutex, I insert sleep for a second in code