Home
last modified time | relevance | path

Searched refs:timeout (Results 1 – 25 of 42) sorted by relevance

12

/commonlibrary/rust/ylong_runtime/ylong_runtime/src/time/
Dtimeout.rs44 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()
Dmod.rs19 mod timeout; module
32 pub use timeout::timeout;
Ddriver.rs99 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/
Dbuilder.rs181 pub fn timeout(mut self, timeout: Timeout) -> Self { in timeout() method
182 self.state.config.timeout = timeout; in timeout()
Dmod.rs214 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/
Dtimer.cpp179 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()
Dtimer.h39 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/
Dclient.rs18 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()
Dtimeout.rs24 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/
Diocp.rs63 timeout: Option<Duration>, in get_results()
67 let timeout = match timeout { in get_results() localVariable
81 timeout, in get_results()
Dselector.rs60 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/
Depoll.rs53 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/
Dpoll.rs37 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/
Dbounded.rs23 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()
Dunbounded.rs22 use crate::time::timeout;
311 match timeout(time, self.channel.recv()).await { in recv_timeout()
/commonlibrary/c_utils/base/src/
Dtimer_event_handler.cpp32 TimerEventHandler::TimerEventHandler(EventReactor* p, uint32_t timeout /* ms */, bool once) in TimerEventHandler() argument
35 interval_(timeout), in TimerEventHandler()
Devent_reactor.cpp71 void EventReactor::RunLoop(int timeout) const in RunLoop()
79 demultiplexer_->Polling(timeout); in RunLoop()
Dio_event_epoll.cpp106 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()
Dio_event_reactor.cpp277 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/
Dclient.rs261 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()
Dreader.rs96 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/
Dtimer_test.rs128 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/
Dlib.rs67 time::{sleep, timeout, Sleep},
83 time::{sleep, timeout, Sleep},
/commonlibrary/rust/ylong_runtime/docs/
Duser_guide.md137 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/
Djs_childprocess.cpp411 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()

12