Skip to content

Commit

Permalink
Update a couple of comments
Browse files Browse the repository at this point in the history
Summary:
The default timekeeper (`HeapTimekeeper`) has now microsecond resolution, so we don't need to advertise `ThreadWheelTimekeeperHighRes` (which I plan to deprecate) anymore.

Also fix a typo in the `HeapTimekeeper` description.

Reviewed By: luciang

Differential Revision: D49293397

fbshipit-source-id: 0e1282158987635613d747a42d9396571084c162
  • Loading branch information
ot authored and facebook-github-bot committed Sep 15, 2023
1 parent ab1c489 commit 05ba1cf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
11 changes: 4 additions & 7 deletions folly/experimental/coro/Sleep.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,14 @@ namespace coro {

/// Return a task that, when awaited, will sleep for the specified duration.
///
/// Throws folly::OperationCancelled if cancellation is requested
/// on the awaiting coroutine's associated CancellationToken.
///
/// NOTE: The default tk has Duration resolution, supply
/// ThreadWheelTimekeeperHighRes for maximum sleep resolution
/// Throws folly::OperationCancelled if cancellation is requested on the
/// awaiting coroutine's associated CancellationToken.
Task<void> sleep(HighResDuration d, Timekeeper* tk = nullptr);

/// Return a task that, when awaited, will sleep for the specified duration.
///
/// May complete sooner that the specified duration if cancellation is
/// requested on the awaiting coroutine's associated CancellationToken.
/// May complete sooner that the specified duration if cancellation is requested
/// on the awaiting coroutine's associated CancellationToken.
Task<void> sleepReturnEarlyOnCancel(
HighResDuration d, Timekeeper* tk = nullptr);

Expand Down
2 changes: 1 addition & 1 deletion folly/futures/HeapTimekeeper.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
namespace folly {

/**
* A Timekeeper with a dedicated thread that uses manages the timeouts using a
* A Timekeeper with a dedicated thread that manages the timeouts using a
* heap. Timeouts can be scheduled with microsecond resolution, though in
* practice the accuracy depends on the OS scheduler's ability to wake up the
* worker thread in a timely fashion.
Expand Down

0 comments on commit 05ba1cf

Please sign in to comment.