Exemple #1
0
void ShmdataFollower::on_data(void* data, size_t size) {
  {
    std::unique_lock<std::mutex> lock(bytes_mutex_);
    shm_stat_.count_buffer(size);
  }
  if (!od_) return;
  od_(data, size);
}
Exemple #2
0
void ShmdataFollower::on_data(void *data, size_t size) {
  {
    std::unique_lock<std::mutex>(bytes_mutex_);
    bytes_written_ += size;
  }
  if (!od_) {
    return;
  }
  od_(data, size);
}