Method: ConcurrentSHM::Channel::Unbuffered::Empty.new

Defined in:
lib/concurrent-shm/channel.rb

.new(shm, offset: 0, autosize: true) ⇒ Object

Allocates an unbuffered, zero-width channel.



18
19
20
21
22
23
# File 'lib/concurrent-shm/channel.rb', line 18

def self.new(shm, offset: 0, autosize: true)
  alloc(shm, 2, offset: offset, autosize: autosize) do |body|
    @state = body[0].as_intptr
    @closed = body[1].as_intptr
  end
end