11 Commits
Author SHA1 Message Date
Stepan KoltsovandGitHub 9e7e1ef7ad io: Explain how to flush stdout/stderr (#7904) 2026-02-12 14:06:48 +00:00
Stepan KoltsovandGitHub 4d4870f291 task: doc that task drops before JoinHandle completion (#7825) 2026-01-03 13:41:03 +00:00
Stepan KoltsovandGitHub 6d3feb581f task: Better typed RawTask::try_read_output (#7806) 2025-12-30 16:53:20 +02:00
Stepan KoltsovandGitHub e076d21f67 process: clarify Child::kill behavior (#7162) 2025-03-06 14:59:51 +03:30
Stepan KoltsovandGitHub 13fbdace66 process: add test for Child::kill after Child::wait (#7163) 2025-02-19 00:52:50 +03:30
Stepan KoltsovandGitHub 8e134172dd process: calling start_kill on exited child should not fail (#7160) 2025-02-15 13:48:22 +03:30
Stepan KoltsovandGitHub 15b362d2dd sync: name mpsc semaphore types (#5146)
Make code easier to read. No functional/perf changes.
2022-10-30 15:38:48 +01:00
Stepan KoltsovandGitHub 3652f71ade sync: add Clone to RecvError types (#4560) 2022-04-06 15:26:45 +02:00
Stepan KoltsovandGitHub d2ad7afd21 time: do not panic on timeout(Duration::MAX) (#3551)
It is tempting to use very large `Duration` value to get a practically
infinite timeout.

Before this commit Tokio panics on checked Instant + Duration
overflow.

This commit implements very simple fix: if Instant + Duration
overflows, we use duration = 30 years. Better fix should avoid
firing a timer on duration overflow. It requires deeper understanding
how timers work, but also it is not clear, for example, what
`Sleep::deadline` function should return.

Similar fix is done for `sleep`.
2021-02-26 10:04:08 +01:00
Stepan KoltsovandGitHub 112e160b62 sync: allow oneshot::Receiver::close after successful try_recv (#3552)
Before this commit `close` after successful `try_recv` panics.

My use case is this: on drop, I call `close` to prevent pushing a
message to the queue, and then fetch the message if any and process
it.

But if message is already processed, `close` panics.  And there is
no API to know if message was already fetched or not (except for
writing a wrapped which would track that info, which would be an
overkill).

But generally `close` operation should be safe to be called any
time.
2021-02-25 20:28:24 +01:00
Stepan KoltsovandCarl Lerche d45f61c183 doc: document from_std functions panic (#2056)
Document that conversion from `std` types must be done from within
the Tokio runtime context.
2020-01-06 10:06:39 -08:00