Method: SizedQueue#clear

Defined in:
thread_sync.c

#clearObject

Removes all objects from the queue.


1305
1306
1307
1308
1309
1310
1311
1312
1313
# File 'thread_sync.c', line 1305

static VALUE
rb_szqueue_clear(VALUE self)
{
    struct rb_szqueue *sq = szqueue_ptr(self);

    rb_ary_clear(check_array(self, sq->q.que));
    wakeup_all(szqueue_pushq(sq));
    return self;
}