[前][次][番号順一覧][スレッド一覧]

ruby-changes:44214

From: nobu <ko1@a...>
Date: Thu, 29 Sep 2016 19:34:30 +0900 (JST)
Subject: [ruby-changes:44214] nobu:r56287 (trunk): thread_sync.c: Document exception types

nobu	2016-09-29 19:34:25 +0900 (Thu, 29 Sep 2016)

  New Revision: 56287

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=56287

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

  Modified files:
    trunk/ChangeLog
    trunk/thread_sync.c
Index: thread_sync.c
===================================================================
--- thread_sync.c	(revision 56286)
+++ thread_sync.c	(revision 56287)
@@ -824,8 +824,8 @@ queue_pop_should_block(int argc, const V https://github.com/ruby/ruby/blob/trunk/thread_sync.c#L824
  * 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
@@ -1002,7 +1002,7 @@ szqueue_push_should_block(int argc, cons https://github.com/ruby/ruby/blob/trunk/thread_sync.c#L1002
  *
  * 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
@@ -1056,8 +1056,8 @@ szqueue_do_pop(VALUE self, int should_bl https://github.com/ruby/ruby/blob/trunk/thread_sync.c#L1056
  * 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
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 56286)
+++ ChangeLog	(revision 56287)
@@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Thu Sep 29 19:34:23 2016  Pete Higgins  <pete@p...>
+
+	* 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@p...>
 
 	* thread_sync.c (Init_thread_sync): Remove confusing doc comments,

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]