summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-09-29 10:34:25 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-09-29 10:34:25 +0000
commit325587ee7f76cbcabbc1e6d181cfacb976c39b52 (patch)
tree6be85a0a712b4f926e2d1206186ecf685bc9d8d1
parentb1d242406a2fc929d0179da3f80458af3eaa5359 (diff)
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] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56287 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog6
-rw-r--r--thread_sync.c10
2 files changed, 11 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 6ebd9ba029..0b5efd2162 100644
--- a/ChangeLog
+++ b/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,
diff --git a/thread_sync.c b/thread_sync.c
index 3b2286ab35..8869af2deb 100644
--- a/thread_sync.c
+++ b/thread_sync.c
@@ -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
@@ -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
@@ -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