Home
last modified time | relevance | path

Searched refs:timeout (Results 1 - 25 of 50) sorted by relevance

12

/commonlibrary/rust/ylong_http/ylong_http_client/src/async_impl/dns/
H A Dhappy_eyeballs.rs35 // timeout of each socket address.
36 timeout: Option<Duration>,
45 // the timeout period for the entire connection establishment.
46 timeout: Option<Duration>,
100 pub(crate) fn new(timeout: Option<Duration>, delay: Option<Duration>) -> Self {
101 Self { timeout, delay }
106 fn new(addrs: Vec<SocketAddr>, timeout: Option<Duration>) -> Self { in new()
109 timeout, in new()
116 match connect(addr, self.timeout).await {
144 .timeout
[all...]
/commonlibrary/rust/ylong_http/ylong_http_client/src/async_impl/
H A Dtimeout.rs24 pub(crate) timeout: Option<Pin<Box<Sleep>>>,
29 pub(crate) fn new(future: T, timeout: Duration) -> Self {
31 timeout: Some(Box::pin(sleep(timeout))),
46 if let Some(delay) = this.timeout.as_mut() {
53 response.body_mut().set_sleep(this.timeout.take());
71 use crate::async_impl::timeout::TimeoutFuture;
109 timeout: None, in ut_timeout_future()
114 timeout: None, in ut_timeout_future()
H A Dclient.rs19 use super::timeout::TimeoutFuture;
25 use crate::runtime::timeout;
197 match timeout(dur, self.inner.connect_to(uri)).await {
216 if let Some(timeout) = self.config.request_timeout.inner() {
217 TimeoutFuture::new(conn::request(conn, message), timeout).await
336 /// Enables a request timeout.
338 /// The timeout is applied from when the request starts connection util the
349 pub fn request_timeout(mut self, timeout: Timeout) -> Self { in request_timeout()
350 self.client.request_timeout = timeout; in request_timeout()
354 /// Sets a timeout fo
[all...]
/commonlibrary/rust/ylong_runtime/ylong_runtime/src/time/
H A Dmod.rs18 mod timeout; modules
30 pub use timeout::timeout;
H A Ddriver.rs104 let mut timeout = None; variables
113 timeout = Some(duration);
128 timeout = Some(Duration::new(0, 0));
130 timeout
/commonlibrary/rust/ylong_http/ylong_http_client/src/async_impl/downloader/
H A Dbuilder.rs163 /// Sets the timeout for downloading body.
177 /// .timeout(Timeout::none());
180 pub fn timeout(mut self, timeout: Timeout) -> Self { in timeout() functions
181 self.state.config.timeout = timeout; in timeout()
H A Dmod.rs102 /// .timeout(Timeout::none())
207 if let Some(timeout) = self.config.timeout.inner() { in check_timeout()
209 if now.duration_since(self.info.as_mut().unwrap().start_time) >= timeout { in check_timeout()
241 pub(crate) timeout: Timeout,
248 timeout: Timeout::none(), in default()
/commonlibrary/ets_utils/js_sys_module/timer/
H A Dtimer.cpp175 int32_t timeout = 0; in SetTimeoutInnerCore() local
177 napi_status status = napi_get_value_int32(env, argv[1], &timeout); in SetTimeoutInnerCore()
179 HILOG_WARN("timeout should be number"); in SetTimeoutInnerCore()
180 timeout = 0; in SetTimeoutInnerCore()
183 if (timeout < 0) { in SetTimeoutInnerCore()
184 HILOG_DEBUG("timeout < 0 is unreasonable"); in SetTimeoutInnerCore()
187 size_t callbackArgc = argc >= 2 ? argc - 2 : 0; // 2 include callback and timeout in SetTimeoutInnerCore()
193 Helper::NapiHelper::CreateReference(env, argv[idx + 2], 1); // 2 include callback and timeout in SetTimeoutInnerCore()
205 callbackInfo = new TimerCallbackInfo(env, tId, timeout, callbackRef, repeat, callbackArgc, callbackArgv); in SetTimeoutInnerCore()
216 HILOG_DEBUG("SetTimeoutInnerCore function call before libuv! tId = %{public}u,timeout in SetTimeoutInnerCore()
[all...]
H A Dtimer.h51 TimerCallbackInfo(napi_env env, uint32_t tId, int32_t timeout, napi_ref callback, in TimerCallbackInfo()
53 : env_(env), tId_(tId), timeout_(timeout), callback_(callback), in TimerCallbackInfo()
/commonlibrary/rust/ylong_runtime/ylong_io/src/sys/unix/
H A Depoll.rs54 pub fn select(&self, events: &mut Events, timeout: Option<Duration>) -> io::Result<()> { in select()
55 // Convert to milliseconds, if input time is none, it means the timeout is -1 in select()
57 let timeout = timeout.map(|time| time.as_millis() as c_int).unwrap_or(-1); in select()
65 timeout in select()
H A Dkqueue.rs47 pub fn select(&self, events: &mut Events, timeout: Option<Duration>) -> io::Result<()> { in select()
50 let timeout = timeout.map(|time| libc::timespec { in select()
56 let timeout_ptr = match timeout.as_ref() { in select()
/commonlibrary/c_utils/base/src/
H A Devent_reactor.cpp71 void EventReactor::RunLoop(int timeout) const in RunLoop()
79 if (demultiplexer_->Polling(timeout) == EPOLL_CRITICAL_ERROR) { in RunLoop()
80 UTILS_LOGE("polling critical error occure: %{public}d", timeout); in RunLoop()
H A Dtimer_event_handler.cpp32 TimerEventHandler::TimerEventHandler(EventReactor* p, uint32_t timeout /* ms */, bool once) in TimerEventHandler()
35 interval_(timeout), in TimerEventHandler()
H A 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()
H A Dio_event_epoll.cpp106 ErrCode IOEventEpoll::Polling(int timeout /* ms */, std::vector<std::pair<int, REventId>>& res) in Polling()
109 int nfds = epoll_wait(epollFd_, &epollEvents[0], maxEvents_, timeout); in Polling()
H A Devent_demultiplexer.h39 int Polling(int timeout);
/commonlibrary/rust/ylong_runtime/ylong_io/src/
H A Dpoll.rs35 /// If `timeout` is none, then it will block the current thread until an
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_http/ylong_http_client/src/util/config/
H A Dsettings.rs179 /// let timeout = Timeout::none();
185 /// Creates a `Timeout` without limiting the timeout.
192 /// let timeout = Timeout::none();
205 /// let timeout = Timeout::from_secs(9);
545 let timeout = Timeout::from_secs(5); in ut_timeout_clone()
546 assert_eq!(timeout.clone(), timeout) in ut_timeout_clone()
556 let timeout = Timeout::default(); in ut_timeout_default()
557 assert_eq!(timeout, Timeout::none()) in ut_timeout_default()
/commonlibrary/rust/ylong_runtime/ylong_io/src/sys/windows/
H A Dselector.rs57 pub(crate) fn select(&self, events: &mut Events, timeout: Option<Duration>) -> io::Result<()> {
58 self.inner.select(events, timeout)
104 fn select(&self, events: &mut Events, timeout: Option<Duration>) -> io::Result<()> { in select()
107 match timeout { in select()
109 let len = self.select_inner(events, timeout)?; in select()
115 self.select_inner(events, timeout)?; in select()
121 fn select_inner(&self, events: &mut Events, timeout: Option<Duration>) -> io::Result<usize> { in select_inner()
132 .get_results(&mut events.status, timeout); in select_inner()
367 self.poll_info.timeout = i64::MAX; in update_while_idle()
/commonlibrary/rust/ylong_http/ylong_http_client/src/sync_impl/
H A Dclient.rs233 /// Enables a request timeout.
235 /// The timeout is applied from when the request starts connection util the
246 pub fn request_timeout(mut self, timeout: Timeout) -> Self { in request_timeout()
247 self.client.request_timeout = timeout; in request_timeout()
251 /// Sets a timeout for only the connect phase of `Client`.
263 pub fn connect_timeout(mut self, timeout: Timeout) -> Self { in connect_timeout()
264 self.client.connect_timeout = timeout; in connect_timeout()
H A Dreader.rs85 /// Sets body read timeout.
95 pub fn read_timeout(mut self, timeout: Timeout) -> Self { in read_timeout()
96 self.read_timeout = timeout; in read_timeout()
/commonlibrary/rust/ylong_runtime/ylong_runtime/tests/
H A Dtimer_test.rs76 /// SDV case for calling `block_on` directly on a `timeout` operation
84 use ylong_runtime::time::timeout; in sdv_block_on_timeout()
88 async move { timeout(Duration::from_secs(2), async move { 1 }).await }, in sdv_block_on_timeout()
/commonlibrary/ets_utils/js_sys_module/process/
H A 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()
419 HILOG_ERROR("timeout kill signal failed"); in TimeoutListener()
427 std::vector<std::string> keyStr = {"timeout", "killSignal", "maxBuffer"}; in InitOptionsInfo()
440 status = napi_get_value_int32(env, property, &optionsInfo_->timeout); in InitOptionsInfo()
442 optionsInfo_->timeout = 0; in InitOptionsInfo()
/commonlibrary/rust/ylong_http/ylong_http_client/src/
H A Dlib.rs88 time::{sleep, timeout, Sleep},
96 time::{sleep, timeout, Sleep},
/commonlibrary/rust/ylong_runtime/ylong_runtime/src/sync/mpsc/bounded/
H A Dmod.rs27 use crate::time::timeout;
218 match timeout(time, self.channel.get_position()).await {
471 match timeout(time, self.recv()).await {

Completed in 10 milliseconds

12