Skip to content

Commit

Permalink
Move examples out of coro
Browse files Browse the repository at this point in the history
Summary:
Move the directory and codemod references to point to the new location

```
find . -type f | xargs sed -i 's,docs/examples/folly/experimental/coro,docs/examples/folly/coro,g'
```

Reviewed By: Orvid

Differential Revision: D66714959

fbshipit-source-id: c44ba3a71fad85e60c8f659ac2e0695cb6451689
  • Loading branch information
Gownta authored and facebook-github-bot committed Dec 6, 2024
1 parent 2673aaa commit be79ab6
Show file tree
Hide file tree
Showing 15 changed files with 14 additions and 14 deletions.
14 changes: 7 additions & 7 deletions .github/scripts/bad_targets
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ root//folly/docs/examples/folly:synchronized_demo
root//folly/docs/examples/folly/container:array_demo
root//folly/docs/examples/folly/dynamic:array_demo
root//folly/docs/examples/folly/dynamic:object_demo
root//folly/docs/examples/folly/experimental/coro:async_scope_demo
root//folly/docs/examples/folly/experimental/coro:cancellable_async_scope_demo
root//folly/docs/examples/folly/experimental/coro:detach_on_cancel_demo
root//folly/docs/examples/folly/experimental/coro:promise_demo
root//folly/docs/examples/folly/experimental/coro:retry_demo
root//folly/docs/examples/folly/experimental/coro:task_demo
root//folly/docs/examples/folly/experimental/coro:with_cancellation_demo
root//folly/docs/examples/folly/coro:async_scope_demo
root//folly/docs/examples/folly/coro:cancellable_async_scope_demo
root//folly/docs/examples/folly/coro:detach_on_cancel_demo
root//folly/docs/examples/folly/coro:promise_demo
root//folly/docs/examples/folly/coro:retry_demo
root//folly/docs/examples/folly/coro:task_demo
root//folly/docs/examples/folly/coro:with_cancellation_demo
root//folly/docs/examples/folly/hash:hash_demo
root//folly/docs/examples/folly/io:i_o_buf_demo
root//folly/experimental/io:async_io
Expand Down
4 changes: 2 additions & 2 deletions folly/coro/AsyncScope.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ namespace coro {
* Tasks added to an AsyncScope must have a void or folly::Unit result-type
* and must handle any errors prior to completing.
*
* @refcode folly/docs/examples/folly/experimental/coro/AsyncScope.cpp
* @refcode folly/docs/examples/folly/coro/AsyncScope.cpp
* @class folly::coro::AsyncScope
*/
//
Expand Down Expand Up @@ -277,7 +277,7 @@ inline folly::SemiFuture<folly::Unit> AsyncScope::cleanup() noexcept {
* constructor or to add() instead of attaching it to the Awaitable.
*
* @refcode
* folly/docs/examples/folly/experimental/coro/CancellableAsyncScope.cpp
* folly/docs/examples/folly/coro/CancellableAsyncScope.cpp
* @class folly::coro::CancellableAsyncScope
*/
class CancellableAsyncScope {
Expand Down
2 changes: 1 addition & 1 deletion folly/coro/DetachOnCancel.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ namespace coro {
* cancellation and return immediately. However, the background task still runs
* until the thread join.
*
* \refcode folly/docs/examples/folly/experimental/coro/DetachOnCancel.cpp
* \refcode folly/docs/examples/folly/coro/DetachOnCancel.cpp
*
* It is important to manage the scope of each variable. If the long running
* task references any variable that is created in the scope of detachOnCancel,
Expand Down
2 changes: 1 addition & 1 deletion folly/coro/Promise.h
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ class Future {
* with this makePromiseContract to handle long running (longer than your
* timeout) tasks that don't handle cancellation properly.
*
* \refcode folly/docs/examples/folly/experimental/coro/Promise.cpp
* \refcode folly/docs/examples/folly/coro/Promise.cpp
*/
template <typename T>
std::pair<Promise<T>, Future<T>> makePromiseContract() {
Expand Down
2 changes: 1 addition & 1 deletion folly/coro/Retry.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
* - retryWithExponentialBackoff: the retries will be restarted with
* exponiential backoff.
*
* \refcode folly/docs/examples/folly/experimental/coro/Retry.cpp
* \refcode folly/docs/examples/folly/coro/Retry.cpp
*/

namespace folly::coro {
Expand Down
2 changes: 1 addition & 1 deletion folly/coro/Timeout.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ namespace folly::coro {
/// otherwise uses the process' default TimeKeeper if 'tk' is null.
///
/// \throws folly::FutureTimeout
/// \refcode folly/docs/examples/folly/experimental/coro/DetachOnCancel.cpp
/// \refcode folly/docs/examples/folly/coro/DetachOnCancel.cpp
template <typename SemiAwaitable, typename Duration>
Task<typename semi_await_try_result_t<SemiAwaitable>::element_type> timeout(
SemiAwaitable semiAwaitable,
Expand Down
2 changes: 1 addition & 1 deletion folly/coro/WithCancellation.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
* co_withCancellation allows caller to pass in a cancellation token to a
* awaitable
*
* \refcode folly/docs/examples/folly/experimental/coro/WithCancellation.cpp
* \refcode folly/docs/examples/folly/coro/WithCancellation.cpp
*/

namespace folly {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit be79ab6

Please sign in to comment.