Cobra/Keywords/lock: различия между версиями

Содержимое удалено Содержимое добавлено
Отмена правки 147274, сделанной Многоместный (обсуждение)
Метка: отмена
м <source> -> <syntaxhighlight> (phab:T237267)
 
Строка 6:
== Синтаксис ==
<font face="verdana">
<sourcesyntaxhighlight lang="python">
lock <expression>
<block>
</sourcesyntaxhighlight></font>
== Пример ==
<font face="verdana">
<sourcesyntaxhighlight lang="python">
# Critical section is to generate output through a single shared writer fm multiple threads
class Tester
Строка 28:
lock _statusWriter
_statusWriter.writeLine(statusLine)
</sourcesyntaxhighlight></font>
<font face="verdana">
<sourcesyntaxhighlight lang="python">
# This is the example from the C# lock doc page converted to cobra
use System.Threading
Строка 74:
for i in 0 : 10
threads[i].start
</sourcesyntaxhighlight></font>
 
{{BookCat}}