-void lock_client::releaser() [[noreturn]] {
- while (1) {
- lock_protocol::lockid_t lid;
- release_fifo.deq(&lid);
- LOG("Releaser: " << lid);
+lock_client::~lock_client() {
+ release_fifo.enq(nothing<lock_protocol::lockid_t>());
+ releaser_thread.join();
+}
+
+void lock_client::releaser() {
+ while (auto mlid = release_fifo.deq()) {
+ lock_protocol::lockid_t lid = mlid;
+ LOG << "Releaser: " << lid;