new Threads
构造函数创建一个 Threads 对象。
示例
var threads1 = new Threads();
var threads2 = new Threads(4);
API
| 调用 | 返回值 |
|---|---|
new Threads() |
Threads |
new Threads(count) |
Threads |
参数
| 参数 | 类型 | 描述 |
|---|---|---|
count |
Number |
线程数。默认值为 4。 |
构造函数创建一个 Threads 对象。
var threads1 = new Threads();
var threads2 = new Threads(4);
| 调用 | 返回值 |
|---|---|
new Threads() |
Threads |
new Threads(count) |
Threads |
| 参数 | 类型 | 描述 |
|---|---|---|
count |
Number |
线程数。默认值为 4。 |