Skip to content

Commit 83d1ad7

Browse files
mit-mitcommit-bot@chromium.org
authored andcommitted
Enable API docs for dart:cli
Clarify this is supported, but deprecated, and may get removed in the future should we find a suitable replacement. Bug: dart-archive/api.dart.dev#81 Bug: #39390 Change-Id: I1304a0862986ae1b365a063ee75f0041341523f5 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214620 Commit-Queue: Michael Thomsen <[email protected]> Reviewed-by: Lasse R.H. Nielsen <[email protected]>
1 parent a398432 commit 83d1ad7

File tree

2 files changed

+26
-26
lines changed

2 files changed

+26
-26
lines changed

sdk/lib/cli/cli.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// BSD-style license that can be found in the LICENSE file.
44

55
/// {@category VM}
6-
/// {@nodoc}
76
@Deprecated(
87
"The functionality of this library is incomplete and may be removed in a later version")
98
library dart.cli;

sdk/lib/cli/wait_for.dart

Lines changed: 26 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,32 @@ class _WaitForUtils {
6969
* Suspends the stack, runs microtasks, and handles incoming events until
7070
* [future] completes.
7171
*
72-
* WARNING: EXPERIMENTAL. USE AT YOUR OWN RISK.
72+
* ## Deprecation notice
73+
*
74+
* The `waitFor` feature is deprecated.
75+
* The feature was intended to solve a particular problem for existing code,
76+
* a problem introduced by a breaking change to the platform libraries.
77+
* The `waitFor` function is not suitable for general use.
78+
* The feature has shortcomings that can affect other code
79+
* running in the same isolate, including:
80+
* * A function call that looks synchronous may cause other asynchronous
81+
* events to run before it returns.
82+
* This is something synchronous code can usually assume not to happen,
83+
* and some code may have been written to take advantage of that
84+
* assumed behavior. Such code can fail in unexpected ways.
85+
* * Multiple nested calls to `waitFor` may block each other
86+
* since the most recent call always needs to complete
87+
* before any other call can complete.
88+
* Judicious use of `waitFor` is necessary to avoid unexpected deadlocks
89+
* which wouldn't happen if using `await` instead.
90+
* If more than one library in the same program is using `waitFor`,
91+
* then it's hard to avoid or control whether such blocking will happen.
92+
*
93+
* The feature is not actively maintained.
94+
* It will remain as-is to support the original problem it was added to solve,
95+
* at least until that problem can be solved in some other way.
96+
*
97+
* ## Call semantics
7398
*
7499
* This call does the following:
75100
* - While [future] is not completed:
@@ -111,30 +136,6 @@ class _WaitForUtils {
111136
* Please be aware that nesting calls to [waitFor] can lead to deadlock if
112137
* subsequent calls block waiting for a condition that is only satisfied when
113138
* an earlier call returns.
114-
*
115-
* **NOTICE**
116-
* The `waitFor` feature is deprecated.
117-
* The feature was intended to solve a particular problem for existing code,
118-
* a problem introduced by a breaking change to the platform libraries.
119-
* The `waitFor` function is not suitable for general use.
120-
* The feature has shortcomings that can affect other code
121-
* running in the same isolate, including:
122-
* * A function call that looks synchronous may cause other asynchronous
123-
* events to run before it returns.
124-
* This is something synchronous code can usually assume not to happen,
125-
* and some code may have been written to take advantage of that
126-
* assumed behavior. Such code can fail in unexpected ways.
127-
* * Multiple nested calls to `waitFor` may block each other
128-
* since the most recent call always needs to complete
129-
* before any other call can complete.
130-
* Judicious use of `waitFor` is necessary to avoid unexpected deadlocks
131-
* which wouldn't happen if using `await` instead.
132-
* If more than one library in the same program is using `waitFor`,
133-
* then it's hard to avoid or control whether such blocking will happen.
134-
*
135-
* The feature is not actively maintained.
136-
* It will remain as-is to support the original problem it was added to solve,
137-
* at least until that problem can be solved in some other way.
138139
*/
139140
@Deprecated(
140141
"This functionality is incomplete and may be removed in a later version")

0 commit comments

Comments
 (0)