8000 changed documentation for "thread-local" variables by schmurfy · Pull Request #69 · ruby/ruby · GitHub
[go: up one dir, main page]

Skip to content

changed documentation for "thread-local" variables #69

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

8000

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions thread.c
Original file line number Diff line number Diff line change
Expand Up @@ -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" },
Expand Down Expand Up @@ -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>.
*/

Expand All @@ -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"
Expand Down Expand Up @@ -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'
Expand Down
0