```wait()```函数返回是否超时,如果超时返回真值。
bool
wait()
wait(timeout)
参数```timeout```用于设置等待超时,单位毫秒。
timeout
false
number
```javascript
function main() {
var event = threading.Event()
var t1 = threading.Thread(function(event) {
var ret = event.wait(100)
Log(`event.wait(100):`, ret)
ret = event.wait()
Log(`event.wait():`, ret)
}, event)
Sleep(1000)
event.set()
t1.join()
}
পরীক্ষাwait()
ফাংশনের রিটার্ন ভ্যালু ।
{@fun/Threads/ThreadEvent/set set}, {@fun/Threads/ThreadEvent/clear clear}, {@fun/Threads/ThreadEvent/isSet isSet}
পরিষ্কার isSet