<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mirrors/arti.git/crates/tor-rtcompat/src/scheduler.rs, branch arti-v1.1.1</title>
<subtitle>mirror of https://gitlab.torproject.org/tpo/core/arti
</subtitle>
<id>http://git.dilluti0n.com/mirrors/arti.git/atom?h=arti-v1.1.1</id>
<link rel='self' href='http://git.dilluti0n.com/mirrors/arti.git/atom?h=arti-v1.1.1'/>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/'/>
<updated>2022-11-10T16:58:35Z</updated>
<entry>
<title>Temporarily disable it_cancels_delayed_firings.</title>
<updated>2022-11-10T16:58:35Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2022-11-10T16:58:35Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=71510fbd96e521d787ce7f4668519b186393217b'/>
<id>urn:sha1:71510fbd96e521d787ce7f4668519b186393217b</id>
<content type='text'>
This test is timing-dependent in a way that seems to fail on heavily
loaded CI machines. See #545.
</content>
</entry>
<entry>
<title>`TaskSchedule`: give error on `sleep*()` if last handle is dropped</title>
<updated>2022-09-07T13:22:38Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2022-09-07T13:22:38Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=86e479ae1360a0cea3ad8020653c59f6aa52d338'/>
<id>urn:sha1:86e479ae1360a0cea3ad8020653c59f6aa52d338</id>
<content type='text'>
This fixes an busy-loop.

When the last `TaskHandle` on a `TaskSchedule` is dropped, the
schedule is permanently canceled: whatever operation it was
scheduling should no longer be performed.  But our code was broken:
the `sleep()` and `sleep_until_wallclock()` functions don't verify
whether the handles are dropped or not.

This breakage caused an CPU-eating busy-loop in
`sleep_until_wallclock`.

With this patch, we now return a `Result&lt;(), SleepError&gt;` from these
functions.

Fixes #572.
</content>
</entry>
<entry>
<title>tor-rtcompat: s/micros/millis inside a flaky test</title>
<updated>2022-07-26T14:01:03Z</updated>
<author>
<name>eta</name>
<email>tor@eta.st</email>
</author>
<published>2022-07-26T14:01:03Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=e0c4e37d2b2c714207ce83032766f27fde8ad832'/>
<id>urn:sha1:e0c4e37d2b2c714207ce83032766f27fde8ad832</id>
<content type='text'>
The other tests wait for 100 milliseconds; this one waits for 100
*microseconds* for some reason, which meant it was understandably flaky
if run on anything less than perfect conditions (arti#515).

This is probably a typo, so just change it.

fixes arti#515
</content>
</entry>
<entry>
<title>TaskSchedule: Add a sleep_until_wallclock method too.</title>
<updated>2022-06-10T17:59:30Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2022-06-07T16:33:17Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=947bbe6fe76059e120c2a46ca213476f6564cc97'/>
<id>urn:sha1:947bbe6fe76059e120c2a46ca213476f6564cc97</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add a `sleep` function to TaskSchedule.</title>
<updated>2022-06-07T14:41:44Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2022-06-07T14:41:44Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=3502a12da2098822732cda87580a9fd19ec98b19'/>
<id>urn:sha1:3502a12da2098822732cda87580a9fd19ec98b19</id>
<content type='text'>
Having this alias makes it easier to implement more complex
schedules, like those used in DirMgr.
</content>
</entry>
<entry>
<title>Add "suspend" and "resume" to TaskSchedule.</title>
<updated>2022-06-07T14:11:49Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2022-06-07T14:11:49Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=897a2d5fa0b628f68536a61f0a264af186592b15'/>
<id>urn:sha1:897a2d5fa0b628f68536a61f0a264af186592b15</id>
<content type='text'>
Unlike "cancel" and "fire", "suspend" and "resume" don't change any
pending timers or events: they just prevent execution of those
events for a while, and let them resume later on.
</content>
</entry>
<entry>
<title>Make daemon tasks self-contained; introduce NetDirProvider</title>
<updated>2022-03-30T13:26:43Z</updated>
<author>
<name>eta</name>
<email>tor@eta.st</email>
</author>
<published>2022-03-28T12:54:36Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=ac64bdea2744c6cd0ede0562954efcfe479afd94'/>
<id>urn:sha1:ac64bdea2744c6cd0ede0562954efcfe479afd94</id>
<content type='text'>
The various background daemon tasks that `arti-client` used to spawn are
now handled inside their respective crates instead, with functions
provided to spawn them that return `TaskHandle`s.

This required introducing a new trait, `NetDirProvider`, which steals
some functionality from the `DirProvider` trait to enable `tor-circmgr`
to depend on it (`tor-circmgr` is a dependency of `tor-dirmgr`, so it
can't depend on `DirProvider` directly).

While we're at it, we also make some of the tasks wait for events from
the `NetDirProvider` instead of sleeping, slightly increasing
efficiency.
</content>
</entry>
<entry>
<title>tor-rtcompat/scheduler: add unit tests, FireIn -&gt; FireAt</title>
<updated>2022-03-24T14:07:40Z</updated>
<author>
<name>eta</name>
<email>tor@eta.st</email>
</author>
<published>2022-03-24T14:07:40Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=ee47a16697d93cfd49a0b44669831713dbe7f63f'/>
<id>urn:sha1:ee47a16697d93cfd49a0b44669831713dbe7f63f</id>
<content type='text'>
Addressing review comments: added some unit tests for the new scheduler
type, and made FireIn use an Instant instead (making it FireAt).
</content>
</entry>
<entry>
<title>Implement a periodic task scheduler, and a basic dormant mode</title>
<updated>2022-03-23T13:43:48Z</updated>
<author>
<name>eta</name>
<email>tor@eta.st</email>
</author>
<published>2022-03-23T13:43:48Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=1ca79ff988d698b9bd8ec21fff12b8120cc17b28'/>
<id>urn:sha1:1ca79ff988d698b9bd8ec21fff12b8120cc17b28</id>
<content type='text'>
This is a revised version of !397; it implements a scheduling system for
periodic tasks that can be externally controlled, and then uses the
external control aspect to implement a basic dormant mode (#90).

More technically, the scheduling system consists of a `Stream` that
periodic tasks are expected to embed in a `while` loop or similar, a
way for tasks themselves to choose how long to wait until the stream
next yields a result, and a handle to control this outside of the task.
</content>
</entry>
</feed>
