/commonlibrary/rust/ylong_runtime/ylong_runtime/src/time/ |
D | timeout.rs | 44 pub fn timeout<F>(duration: Duration, future: F) -> Timeout<F> in timeout() function 73 let timeout = unsafe { self.get_unchecked_mut() }; in poll() localVariable 75 let value = unsafe { Pin::new_unchecked(&mut timeout.value) }; in poll() 80 let sleep = unsafe { Pin::new_unchecked(&mut timeout.sleep) }; in poll() 92 use crate::time::timeout; 110 timeout(Duration::from_millis(10), rx).await.is_ok() in ut_timeout_test() 117 timeout(Duration::from_millis(10), rx).await.is_ok() in ut_timeout_test() 137 let result = timeout(Duration::from_millis(100), async { 1 }).await; in ut_timeout_test_002()
|
D | mod.rs | 19 mod timeout; module 32 pub use timeout::timeout;
|
D | driver.rs | 99 let mut timeout = None; in run() localVariable 125 timeout = Some(duration); in run() 136 timeout in run()
|
/commonlibrary/rust/ylong_http/ylong_http_client/src/async_impl/downloader/ |
D | builder.rs | 181 pub fn timeout(mut self, timeout: Timeout) -> Self { in timeout() method 182 self.state.config.timeout = timeout; in timeout()
|
D | mod.rs | 214 if let Some(timeout) = self.config.timeout.inner() { in check_timeout() 216 if now.duration_since(self.info.as_mut().unwrap().start_time) >= timeout { in check_timeout() 251 pub(crate) timeout: Timeout, field 258 timeout: Timeout::none(), in default()
|
/commonlibrary/ets_utils/js_sys_module/timer/ |
D | timer.cpp | 179 int32_t timeout = 0; in SetTimeoutInner() local 181 napi_status status = napi_get_value_int32(env, argv[1], &timeout); in SetTimeoutInner() 184 timeout = 0; in SetTimeoutInner() 187 if (timeout < 0) { in SetTimeoutInner() 210 …callbackInfo = new TimerCallbackInfo(env, tId, timeout, callbackRef, repeat, callbackArgc, callbac… in SetTimeoutInner() 224 …_timer_start(callbackInfo->timeReq_, TimerCallback, timeout >= 0 ? timeout : 1, timeout > 0 ? time… in SetTimeoutInner()
|
D | timer.h | 39 TimerCallbackInfo(napi_env env, uint32_t tId, int32_t timeout, napi_ref callback, in TimerCallbackInfo() 41 : env_(env), tId_(tId), timeout_(timeout), callback_(callback), in TimerCallbackInfo()
|
/commonlibrary/rust/ylong_http/ylong_http_client/src/async_impl/ |
D | client.rs | 18 use crate::async_impl::timeout::TimeoutFuture; 25 use crate::{sleep, timeout, ErrorKind, HttpClientError, Proxy, Request, Timeout, Uri}; 228 match timeout(dur, self.inner.connect_to(uri)).await { in send_request_with_uri() 243 if let Some(timeout) = self.client_config.request_timeout.inner() { in send_request_with_uri() 245 timeout: Some(Box::pin(sleep(timeout))), in send_request_with_uri() 405 pub fn request_timeout(mut self, timeout: Timeout) -> Self { in request_timeout() 406 self.client.request_timeout = timeout; in request_timeout() 422 pub fn connect_timeout(mut self, timeout: Timeout) -> Self { in connect_timeout() 423 self.client.connect_timeout = timeout; in connect_timeout()
|
D | timeout.rs | 24 pub(crate) timeout: Option<Pin<Box<Sleep>>>, field 37 if let Some(delay) = this.timeout.as_mut() { in poll() 47 response.body_mut().set_sleep(this.timeout.take()); in poll()
|
/commonlibrary/rust/ylong_runtime/ylong_io/src/sys/windows/ |
D | iocp.rs | 63 timeout: Option<Duration>, in get_results() 67 let timeout = match timeout { in get_results() localVariable 81 timeout, in get_results()
|
D | selector.rs | 60 pub(crate) fn select(&self, events: &mut Events, timeout: Option<Duration>) -> io::Result<()> { in select() 61 self.inner.select(events, timeout) in select() 116 fn select(&self, events: &mut Events, timeout: Option<Duration>) -> io::Result<()> { in select() 119 match timeout { in select() 121 let len = self.select_inner(events, timeout)?; in select() 127 self.select_inner(events, timeout)?; in select() 133 fn select_inner(&self, events: &mut Events, timeout: Option<Duration>) -> io::Result<usize> { in select_inner() 143 .get_results(&mut events.status, timeout); in select_inner() 388 self.poll_info.timeout = i64::MAX; in update()
|
/commonlibrary/rust/ylong_runtime/ylong_io/src/sys/linux/ |
D | epoll.rs | 53 pub fn select(&self, events: &mut Events, timeout: Option<Duration>) -> io::Result<()> { in select() 56 let timeout = timeout.map(|time| time.as_millis() as c_int).unwrap_or(-1); in select() localVariable 64 timeout in select()
|
/commonlibrary/rust/ylong_runtime/ylong_io/src/ |
D | poll.rs | 37 pub fn poll(&self, events: &mut Events, timeout: Option<Duration>) -> io::Result<()> { in poll() 38 self.selector.select(events, timeout) in poll()
|
/commonlibrary/rust/ylong_runtime/ylong_runtime/src/sync/mpsc/ |
D | bounded.rs | 23 use crate::time::timeout; 214 match timeout(time, self.channel.get_position()).await { in send_timeout() 431 match timeout(time, self.channel.recv()).await { in recv_timeout()
|
D | unbounded.rs | 22 use crate::time::timeout; 311 match timeout(time, self.channel.recv()).await { in recv_timeout()
|
/commonlibrary/c_utils/base/src/ |
D | timer_event_handler.cpp | 32 TimerEventHandler::TimerEventHandler(EventReactor* p, uint32_t timeout /* ms */, bool once) in TimerEventHandler() argument 35 interval_(timeout), in TimerEventHandler()
|
D | event_reactor.cpp | 71 void EventReactor::RunLoop(int timeout) const in RunLoop() 79 demultiplexer_->Polling(timeout); in RunLoop()
|
D | io_event_epoll.cpp | 106 ErrCode IOEventEpoll::Polling(int timeout /* ms */, std::vector<std::pair<int, REventId>>& res) in Polling() argument 109 int nfds = epoll_wait(epollFd_, &epollEvents[0], maxEvents_, timeout); in Polling()
|
D | io_event_reactor.cpp | 277 void IOEventReactor::Run(int timeout) in Run() argument 285 if (timeout == -1) { in Run() 290 res = backend_->Polling(timeout, gotEvents); in Run() 292 res = backend_->Polling(timeout, gotEvents); in Run()
|
/commonlibrary/rust/ylong_http/ylong_http_client/src/sync_impl/ |
D | client.rs | 261 pub fn request_timeout(mut self, timeout: Timeout) -> Self { in request_timeout() 262 self.client.request_timeout = timeout; in request_timeout() 278 pub fn connect_timeout(mut self, timeout: Timeout) -> Self { in connect_timeout() 279 self.client.connect_timeout = timeout; in connect_timeout()
|
D | reader.rs | 96 pub fn read_timeout(mut self, timeout: Timeout) -> Self { in read_timeout() 97 self.read_timeout = timeout; in read_timeout()
|
/commonlibrary/rust/ylong_runtime/ylong_runtime/tests/ |
D | timer_test.rs | 128 use ylong_runtime::time::timeout; in sdv_block_on_timeout() 132 async move { timeout(Duration::from_secs(2), async move { 1 }).await }, in sdv_block_on_timeout()
|
/commonlibrary/rust/ylong_http/ylong_http_client/src/ |
D | lib.rs | 67 time::{sleep, timeout, Sleep}, 83 time::{sleep, timeout, Sleep},
|
/commonlibrary/rust/ylong_runtime/docs/ |
D | user_guide.md | 137 use ylong_runtime::time::{timeout, sleep}; 142 let result = timeout(Duration::from_millis(100), async { 1 }).await; 146 let result = timeout(Duration::from_millis(100), sleep(Duration::from_secs(1)));
|
/commonlibrary/ets_utils/js_sys_module/process/ |
D | js_childprocess.cpp | 411 int32_t timeout = temp->timeout * TIME_EXCHANGE; in TimeoutListener() local 412 if (timeout > 0) { in TimeoutListener() 413 usleep(static_cast<size_t>(timeout)); in TimeoutListener() 440 status = napi_get_value_int32(env, property, &optionsInfo_->timeout); in InitOptionsInfo() 442 optionsInfo_->timeout = 0; in InitOptionsInfo()
|