الفرق بين المراجعتين ل"Ruby/Thread/thread variable set"

من موسوعة حسوب
< Ruby‏ | Thread
اذهب إلى التنقل اذهب إلى البحث
ط (مراجعة وتدقيق.)
 
سطر 1: سطر 1:
<noinclude>{{DISPLAYTITLE: التابع <code>thread_variable_set‎</code> الخاص بالصنف <code>Thread</code> في روبي}}</noinclude>
+
<noinclude>{{DISPLAYTITLE: التابع <code>Thread.thread_variable_set‎</code> في روبي}}</noinclude>
 
[[تصنيف: Ruby]]
 
[[تصنيف: Ruby]]
 
[[تصنيف: Ruby Method]]
 
[[تصنيف: Ruby Method]]
 
[[تصنيف: Ruby Thread]]
 
[[تصنيف: Ruby Thread]]
يعين التابع <code>thread_variable_set</code> قيمة المتغير المحلي في [[Ruby/Thread|المهمة الفرعية]] (thread local) ذو الاسم المعطى <code>key</code> ويعطيه القيمة <code>value</code> (انظر فقرة البنية العامة).
+
يعين التابع <code>thread_variable_set</code> قيمة متغير محلي ذي اسم محدَّد في [[Ruby/Thread|المهمة الفرعية]] (thread local) إلى قيمة معيَّنة.
  
لاحظ أن هذه المتغيرات محلية في [[Ruby/Thread|المهمة الفرعية]]، وليس في [[Ruby/Fiber|الألياف]]. يرجى الاطلاع على صفحتي <code>[[Ruby/Thread/thread variable get|thread_variable_get]]</code> و <code>[[Ruby/Thread/index operator|[]]]</code> لمزيد من المعلومات.
+
لاحظ أنَّ هذه المتغيرات محلية في [[Ruby/Thread|المهمة الفرعية]]، وليس في [[Ruby/Fiber|الألياف]]. يرجى الاطلاع على صفحة التابع <code>[[Ruby/Thread/thread variable get|thread_variable_get]]</code> والمعامل <code>[[Ruby/Thread/index operator|[]]]</code> لمزيد من المعلومات.
 
==البنية العامة==
 
==البنية العامة==
 
<syntaxhighlight lang="ruby">thread_variable_set(key, value)‎</syntaxhighlight>
 
<syntaxhighlight lang="ruby">thread_variable_set(key, value)‎</syntaxhighlight>
سطر 15: سطر 15:
 
قيمة المتغير.
 
قيمة المتغير.
  
==انظر أيضا==
+
==انظر أيضًا==
*التابع <code>[[Ruby/Thread/thread variable get|thread_variable_get]]</code>: يُعيد التابع <code>thread_variable_get</code> قيمة المتغير المحلي في [[Ruby/Thread|المهمة الفرعية]] (thread local variable) الذي تم تعيينه.
+
*التابع <code>[[Ruby/Thread/thread variable get|thread_variable_get]]</code>: يُعيد قيمة المتغير المحلي في [[Ruby/Thread|المهمة الفرعية]] (thread local variable) الذي تم تعيينه.
*التابع <code>[[Ruby/Thread/thread variables|thread_variables]]</code>: يُعيد التابع <code>thread_variables</code> [[Ruby/Array|مصفوفة]] من أسماء المتغيرات المحلية في [[Ruby/Thread|المهمة الفرعية]] (thread-local) (على شكل رموز).
+
*التابع <code>[[Ruby/Thread/thread variables|thread_variables]]</code>: يُعيد [[Ruby/Array|مصفوفة]] من أسماء المتغيرات المحلية في [[Ruby/Thread|المهمة الفرعية]] (thread-local) على شكل رموز.
 
==مصادر==
 
==مصادر==
*[http://ruby-doc.org/core-2.5.1/Thread.html#method-i-thread_variable_set قسم التابع thread_variable_set‎ في الصنف Thread‎ في توثيق روبي الرسمي.]
+
*[http://ruby-doc.org/core-2.5.1/Thread.html#method-i-thread_variable_set قسم التابع thread_variable_set‎ في الصنف Thread‎ في توثيق روبي الرسمي.]

المراجعة الحالية بتاريخ 08:39، 6 ديسمبر 2018

يعين التابع thread_variable_set قيمة متغير محلي ذي اسم محدَّد في المهمة الفرعية (thread local) إلى قيمة معيَّنة.

لاحظ أنَّ هذه المتغيرات محلية في المهمة الفرعية، وليس في الألياف. يرجى الاطلاع على صفحة التابع thread_variable_get والمعامل [] لمزيد من المعلومات.

البنية العامة

thread_variable_set(key, value)

المعاملات

key‎

اسم المتغير.

value‎

قيمة المتغير.

انظر أيضًا

مصادر