Commit Graph

12 Commits

Author SHA1 Message Date
Nick Mathewson 572e2b93de Update docs wrt tokio a bit 2021-03-02 12:12:41 -05:00
Nick Mathewson 8c31418500 Port to work with tokio or async-std.
This is fairly ugly and I think I'll need to mess around with the
feature configuration a while until we get something that's pleasant
to develop with.  This still seems like a good idea, though, since
we _will_ need to be executor-agnostic in the end, or we'll have no
way to handle wasm or embedded environments.

Later down the road, we'll probably want to use futures::Executor or
futures::Spawn more than having global entry points in
tor_rtcompat.  That would probably make our feature story simpler.

Tokio is the default now, since tokio seems to be more heavily used
for performance-critical stuff.

This patch breaks tests; the next one will fix them, albeit
questionably.
2021-03-02 11:55:09 -05:00
Nick Mathewson 635cdc06d8 Write a few misc unit tests 2020-12-15 15:34:08 -05:00
Nick Mathewson 4ac4f5496e rtcompat: add a function to sleep until a given wallclock time
(We can't just subtract and sleep, since we should be at least
somewhat concerned about clock jumps.)
2020-12-04 13:12:45 -05:00
Nick Mathewson 40ac33bde2 Upgrade async-io 2020-12-03 13:05:51 -05:00
Nick Mathewson 0dc5c7b459 Bump to latest async-io 2020-12-01 15:21:50 -05:00
Nick Mathewson f5f2a648a3 tor-dirclient: add timeouts
This adds two timeouts in total: one for sending begin, and getting
headers, and one for getting the rest of the data.

These timeouts are way too long right now, but at least the code is
there.
2020-12-01 08:56:25 -05:00
Nick Mathewson 3d4f5f261e Require documentation in tor-rtcompat. 2020-11-20 17:24:16 -05:00
Nick Mathewson 5b2e18e358 tor-chanmgr: timeout support. 2020-11-11 17:34:54 -05:00
Nick Mathewson 6ae2713763 Document tor-rtcompat crate a little 2020-11-11 14:40:01 -05:00
Nick Mathewson 9504086793 Remove a couple of unused dependencies 2020-11-11 13:48:38 -05:00
Nick Mathewson 59e4b5631a Isolate async_std usage in a new tor_rtcompat crate.
Like tor_llcrypto, this crate is meant to expose only the part of
other crates (in this case, a async runtime crate) that we use.
2020-11-11 13:46:39 -05:00