Project

General

Profile

Actions

Feature #10052

closed

Add parameter non_block (defaults to false) on SizedQueue#push

Added by herwinw (Herwin Quarantainenet) over 9 years ago. Updated over 9 years ago.

Status:
Closed
Assignee:
-
Target version:
-
[ruby-core:63794]

Description

The implementations of Queue and SizedQueue have a method pop, where a parameter non_block would make the call raise a ThreadError if the queue is empty. Since popping of an empty queue is comparable with pushing to a full SizedQueue, I guess it would be nice to have an optional second parameter to make SizedQueue#push optional non-blocking too.


Files

ruby10052_sized_queue_push_nonblock.diff (2.03 KB) ruby10052_sized_queue_push_nonblock.diff herwinw (Herwin Quarantainenet), 07/17/2014 09:49 AM
Actions

Also available in: Atom PDF

Like0
Like0Like0