Skip to content

Commit

Permalink
thread_sync.c: Document exception types
Browse files Browse the repository at this point in the history
* thread_sync.c (rb_queue_pop, rb_szqueue_push, rb_szqueue_pop):
  Document exception types, ThreadError, raised by Queue and
  SizedQueue.  [Fix GH-1451]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56287 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
nobu committed Sep 29, 2016
1 parent b1d2424 commit 325587e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
6 changes: 6 additions & 0 deletions ChangeLog
@@ -1,3 +1,9 @@
Thu Sep 29 19:34:23 2016 Pete Higgins <pete@peterhiggins.org>

* thread_sync.c (rb_queue_pop, rb_szqueue_push, rb_szqueue_pop):
Document exception types, ThreadError, raised by Queue and
SizedQueue. [Fix GH-1451]

Thu Sep 29 19:21:02 2016 Pete Higgins <pete@peterhiggins.org>

* thread_sync.c (Init_thread_sync): Remove confusing doc comments,
Expand Down
10 changes: 5 additions & 5 deletions thread_sync.c
Expand Up @@ -824,8 +824,8 @@ queue_pop_should_block(int argc, const VALUE *argv)
* Retrieves data from the queue.
*
* If the queue is empty, the calling thread is suspended until data is pushed
* onto the queue. If +non_block+ is true, the thread isn't suspended, and an
* exception is raised.
* onto the queue. If +non_block+ is true, the thread isn't suspended, and
* +ThreadError+ is raised.
*/

static VALUE
Expand Down Expand Up @@ -1002,7 +1002,7 @@ szqueue_push_should_block(int argc, const VALUE *argv)
*
* If there is no space left in the queue, waits until space becomes
* available, unless +non_block+ is true. If +non_block+ is true, the
* thread isn't suspended, and an exception is raised.
* thread isn't suspended, and +ThreadError+ is raised.
*/

static VALUE
Expand Down Expand Up @@ -1056,8 +1056,8 @@ szqueue_do_pop(VALUE self, int should_block)
* Retrieves data from the queue.
*
* If the queue is empty, the calling thread is suspended until data is pushed
* onto the queue. If +non_block+ is true, the thread isn't suspended, and an
* exception is raised.
* onto the queue. If +non_block+ is true, the thread isn't suspended, and
* +ThreadError+ is raised.
*/

static VALUE
Expand Down

0 comments on commit 325587e

Please sign in to comment.