Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

changed documentation for "thread-local" variables #69

Closed
wants to merge 1 commit into from

3 participants

Julien Ammous kosaki Ayumu AIZAWA
Julien Ammous

Hi,
This patch is a proposition of change for "thread-local" variables, I discovered recently that they are not thread local after all and keeping a wrong documentation is the worst we can do !

Feel free to change the formulation as long as the documentation is changed to reflect the true behavior.

( the discussion on this started on http://bugs.ruby-lang.org/issues/5750 )

kosaki
Collaborator

Can you please switch a discussion and pull request to bugs.ruby-lang.org? We don't hope to discuss the same topic on two place. It can make confusing easily.

Moreover, ruby upstream repository is svn. github is only mirror. so, we can't use github pull mechanism.

Thank you for your cooperation.

Ayumu AIZAWA
Collaborator

Merged by r34198. Thanks.

Ayumu AIZAWA ayumin closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Dec 15, 2011
  1. Julien Ammous
This page is out of date. Refresh to see the latest.
Showing with 6 additions and 6 deletions.
  1. +6 6 thread.c
12 thread.c
View
@@ -2058,9 +2058,9 @@ rb_thread_local_aref(VALUE thread, ID id)
* call-seq:
* thr[sym] -> obj or nil
*
- * Attribute Reference---Returns the value of a thread-local variable, using
- * either a symbol or a string name. If the specified variable does not exist,
- * returns <code>nil</code>.
+ * Attribute Reference---Returns the value of a fiber-local variable (current thread's root fiber
+ * if not explicitely inside a Fiber), using either a symbol or a string name.
+ * If the specified variable does not exist, returns <code>nil</code>.
*
* [
* Thread.new { Thread.current["name"] = "A" },
@@ -2111,7 +2111,7 @@ rb_thread_local_aset(VALUE thread, ID id, VALUE val)
* call-seq:
* thr[sym] = obj -> obj
*
- * Attribute Assignment---Sets or creates the value of a thread-local variable,
+ * Attribute Assignment---Sets or creates the value of a fiber-local variable,
* using either a symbol or a string. See also <code>Thread#[]</code>.
*/
@@ -2126,7 +2126,7 @@ rb_thread_aset(VALUE self, VALUE id, VALUE val)
* thr.key?(sym) -> true or false
*
* Returns <code>true</code> if the given string (or symbol) exists as a
- * thread-local variable.
+ * fiber-local variable.
*
* me = Thread.current
* me[:oliver] = "a"
@@ -2179,7 +2179,7 @@ rb_thread_alone(void)
* call-seq:
* thr.keys -> array
*
- * Returns an an array of the names of the thread-local variables (as Symbols).
+ * Returns an an array of the names of the fiber-local variables (as Symbols).
*
* thr = Thread.new do
* Thread.current[:cat] = 'meow'
Something went wrong with that request. Please try again.