Method: Thread::Queue#freeze

Defined in:
thread_sync.c

#freezeObject

The queue can’t be frozen, so this method raises an exception:

Thread::Queue.new.freeze # Raises TypeError (cannot freeze #<Thread::Queue:0x...>)


1176
1177
1178
1179
1180
1181
# File 'thread_sync.c', line 1176

static VALUE
rb_queue_freeze(VALUE self)
{
    rb_raise(rb_eTypeError, "cannot freeze " "%+"PRIsVALUE, self);
    UNREACHABLE_RETURN(self);
}