std::thread::park_timeout_ms

Function std::thread::park_timeout_ms

pub fn park_timeout_ms(ms: u32)
Deprecated since 1.6.0: replaced by std::thread::park_timeout

Use park_timeout.

Blocks unless or until the current thread's token is made available or the specified duration has been reached (may wake spuriously).

The semantics of this function are equivalent to park() except that the thread will be blocked for roughly no longer than ms. This method should not be used for precise timing due to anomalies such as preemption or platform differences that may not cause the maximum amount of time waited to be precisely ms long.

See the module documentation for more detail-

© 2010 The Rust Project Developers
Licensed under the Apache License, Version 2.0 or the MIT license, at your option.
https://doc.rust-lang.org/std/thread/fn.park_timeout_ms.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部