Class: UringMachine::Mutex

Inherits:
Object
  • Object
show all
Defined in:
ext/um/um_mutex_class.c,
ext/um/um_mutex_class.c

Overview

A futex-based Mutex implementation for controlling access to a shared resource. The mutex can be used by calling ‘UringMachine#synchronize`.

Instance Method Summary collapse

Constructor Details

#initializevoid

Initializes a new mutex instance. The mutex can be used by calling ‘UringMachine#synchronize`.



40
41
42
43
44
# File 'ext/um/um_mutex_class.c', line 40

VALUE Mutex_initialize(VALUE self) {
  struct um_mutex *mutex = Mutex_data(self);
  um_mutex_init(mutex);
  return self;
}