Project

General

Profile

Actions

Bug #8988

closed

[DOC] fix incorrect documentation for SizedQueue

Added by jackdanger (Jack Danger) over 10 years ago. Updated over 10 years ago.

Status:
Closed
Assignee:
Target version:
ruby -v:
ruby 2.1.0dev (2013-10-05 trunk 43149) [x86_64-darwin12.4.0]
[ruby-core:57681]

Description

The SizedQueue documentation was incorrect for both SizedQueue#pop and SizedQueue#num_waiting. This patch adds correct documentation using language that is very similar to Queue#pop and Queue#num_waiting.

  • Document-method: pop
  • call_seq: pop(non_block=false)
    • Returns the number of threads waiting on the queue.
    • 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.
      */
    • Document-method: pop
    • call_seq: pop(non_block=false)
    • Document-method: num_waiting
    • call_seq: num_waiting
    • Returns the number of threads waiting on the queue.
      */
Actions #1

Updated by zzak (zzak _) over 10 years ago

  • Status changed from Open to Closed

This issue was solved with changeset r43673.
Jack, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


  • ext/thread/thread.c: [DOC] This patch accomplishes the following:

    • Teach RDoc about ConditionVariable
    • Teach RDoc about Queue
    • Teach RDoc about SizedQueue
    • Use fully-qualified namespace for Document-method
      This is necessary to separate definitions between classes
    • Fix rdoc bug in call_seq vs. call-seq
    • Correct doc for SizedQueue#pop patch by @jackdanger (Jack Danger) [Bug #8988]
Actions

Also available in: Atom PDF

Like0
Like0