From: nobu@... Date: 2014-07-17T10:57:22+00:00 Subject: [ruby-core:63800] [ruby-trunk - Feature #10052] [Closed] Add parameter non_block (defaults to false) on SizedQueue#push Issue #10052 has been updated by Nobuyoshi Nakada. Status changed from Open to Closed % Done changed from 0 to 100 Applied in changeset r46852. ---------- thread/thread.c: non-blocking push on SizedQueue * ext/thread/thread.c (rb_szqueue_push): add optional parameter, non_block defaulted to false. [ruby-core:63794] [Feature #10052] ---------------------------------------- Feature #10052: Add parameter non_block (defaults to false) on SizedQueue#push https://bugs.ruby-lang.org/issues/10052#change-47831 * Author: Herwin . * Status: Closed * Priority: Normal * Assignee: * Category: ext * Target version: ---------------------------------------- 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) -- https://bugs.ruby-lang.org/