| 24 | long start_time = butil::cpuwide_time_ms(); |
| 25 | int c = 0; |
| 26 | void* rdlocker(void* arg) { |
| 27 | auto rw = (bthread_rwlock_t*)arg; |
| 28 | bthread_rwlock_rdlock(rw); |
| 29 | LOG(INFO) << butil::string_printf("[%" PRIu64 "] I'm rdlocker, %d, %" PRId64 "ms\n", |
| 30 | pthread_numeric_id(), ++c, |
| 31 | butil::cpuwide_time_ms() - start_time); |
| 32 | bthread_usleep(10000); |
| 33 | bthread_rwlock_unlock(rw); |
| 34 | return NULL; |
| 35 | } |
| 36 | |
| 37 | void* wrlocker(void* arg) { |
| 38 | auto rw = (bthread_rwlock_t*)arg; |
nothing calls this directly
no test coverage detected