Method: ConcurrentSHM::SharedMemory#initialize

Defined in:
ext/concurrent-shm/posix.c

#initialize(fd, name) ⇒ Object

Create a ConcurrentSHM::SharedMemory instance for the specified file descriptor.

Parameters:

  • fd (Integer)

    the file descriptor

  • name (String)

    the name



102
103
104
105
106
107
# File 'ext/concurrent-shm/posix.c', line 102

static VALUE shared_memory_initialize(VALUE self, VALUE fd, VALUE name)
{
    rb_call_super(1, &fd); // super(fd)
    rb_iv_set(self, "@name", name); // @name = name
    return self;
}