One way would be to increment a variable every time a thread is created, and decrement it whenever a thread terminates. When it reaches zero again, close the whole process.
一种解决方法是增加一个变量,每创建一个新的线程该变量就加1,每终止一个线程该变量就减1,当该变量再次为零时,就关闭整个进程。
But notice unlike a for loop, if you want to declare a variable or increment or decrement to variable, you've got to do that yourself.
但请注意不像for循环,如果你想声明一个变量,或者变大或变小一个变量,你需要自己完成。
Reverse, for example, must be able to decrement its arguments as well as increment them; it USES the expression — last.
举个例子,Reverse,必须能够像递减一样地递增;它使用这个表达式—last。
These include pre- and post-increment/decrement ( i++, --foo ), add/sub/mult/div assign operators ( a+=3, b*=2, c/=2.2, d-=6.2 ).
其中包括前后加/减(i++、--foo), 加减乘除赋值运算符(a+=3、b*=2、c/=2.2、d-=6.2)。
How increment and decrement "arithmetic operations" can be performed in any one of the registers in 8085?
如何增加和减少“加减乘除”能在8085的任何一个寄存器完成?
This property enables you to increment or decrement the value of the progress bar directly.
此属性使您可以直接增加或减小进度栏的值。
Expression statement or statements to increment or decrement the loop counters.
用于递增或递减循环计数器的一条或多条表达式语句。
In read-only mode, you cannot increment or decrement them or set the raw value or other values within them.
在只读模式下,不能对其进行增减或在其中设置原始值或其他值。
Updating a variable by adding 1 is called an increment; subtracting 1 is called a decrement.
对一个变量每次加1也可以叫做一种递增,每次减去1就可以叫做递减了。
The user control displays a read-only text box with a number in it and two arrows that users can click to increment and decrement the value in the text box.
该用户控件显示一个只读文本框,其中有一个数字和两个箭头,用户可以单击这两个箭头来增加和减少文本框中的值。
Dynamic damping ratio of frozen soil decreases with increment of frequency or decrement of temperature.
冻土的动阻尼比随频率的增加或温度的降低而减小。
To ensure the quality of a translation, the increment, decrement and distortion of information must be controlled effectively.
要保证译文的质量,就必须对翻译过程中信息的增量、减量和失真进行有效的控制。
The methods of this class let you safely increment, decrement, exchange, and compare values from any thread.
使用这个类的方法可以安全地递增、递减、交换和比较任何线程中的值。
Do not use an increment or decrement operator on the same object in more than two subexpressions of the same expression.
一个表达式里,不要在两个或更多的子表达式中对同一对象做自增或自减操作。
The results show that at the same fuel delivery advance angle, engine speed and load, the line peak pressure and rate of pressure increment and decrement of DME are lower than that of diesel fuel.
试验结果表明:在供油提前角、转速和负荷相同的情况下,燃用二甲醚时油管泵端和嘴端压力的上升和下降速度、压力峰值都比燃用柴油时低;
Addition of calcium and magnesium ions to soymilk resulted in limited decrement of clotting time, increment of coagulum strengthness and fall of adhesiveness of soymilk coagulum.
钙和镁离子可以显著缩短豆浆凝固时间,可以增强凝固强度,减小凝胶粘性,但幅度不大。
Defines an iterator that can access elements in a container in the forward direction by using the increment operator and in the backward direction by using the decrement operator.
定义一个迭代器,该迭代器可以向前(通过使用递增运算符)或向后(通过使用递减运算符)访问容器中的元素。
Elements can be accessed in the forward direction by using the decrement operator and in the backward direction by using the increment operator.
可以向前(通过使用递减运算符)或向后(通过使用递增运算符)访问元素。
Increment and decrement operators cause side-effects when you use them in expressions that cannot be replicated in SQL and are, therefore, not supported.
在无法复制到SQL中的表达式中使用增量和减量运算符时会产生副作用,因而不支持此类运算符。
Interface for an iterator that can access elements in a container in the forward direction by using the increment operator and in the backward direction by using the decrement operator.
迭代器的接口,该迭代器可以向前(通过使用递增运算符)或向后(通过使用递减运算符)访问容器中的元素。
Interface for an iterator that can access elements in a container in the forward direction by using the increment operator and in the backward direction by using the decrement operator.
迭代器的接口,该迭代器可以向前(通过使用递增运算符)或向后(通过使用递减运算符)访问容器中的元素。
应用推荐