Open kamalmarhubi opened 8 years ago
The non-duration wait_timeout
s are deprecated in nightly, in combination with #![deny(warnings)]
this causes the build to fail:
Compiling syncbox v0.2.4 (file:///home/user/projects/syncbox)
src/delay_queue.rs:99:40: 99:71 error: use of deprecated item: replaced by `std::sync::Condvar::wait_timeout`, #[deny(deprecated)] on by default
src/delay_queue.rs:99 queue = self.inner.condvar.wait_timeout_ms(queue, timeout).unwrap().0;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/delay_queue.rs:194:40: 194:71 error: use of deprecated item: replaced by `std::sync::Condvar::wait_timeout`, #[deny(deprecated)] on by default
src/delay_queue.rs:194 self.inner.condvar.wait_timeout_ms(queue, timeout).unwrap().0
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/linked_queue.rs:209:38: 209:64 error: use of deprecated item: replaced by `std::sync::Condvar::wait_timeout`, #[deny(deprecated)] on by default
src/linked_queue.rs:209 last = self.not_full.wait_timeout_ms(last, dur)
^~~~~~~~~~~~~~~~~~~~~~~~~~
src/linked_queue.rs:272:39: 272:65 error: use of deprecated item: replaced by `std::sync::Condvar::wait_timeout`, #[deny(deprecated)] on by default
src/linked_queue.rs:272 head = self.not_empty.wait_timeout_ms(head, dur)
^~~~~~~~~~~~~~~~~~~~~~~~~~
error: aborting due to 4 previous errors
Could not compile `syncbox`.
To learn more, run the command again with --verbose.
The
LinkedQueue
hasoffer_ms
andpoll_ms
which both take au32
of milliseconds, while theDelayQueue
has apoll_timeout
that takes aDuration
. SinceDuration
is provided in thestd
, I think it's the right thing to standardize on.