Skip to content

Commit 92638bf

Browse files
aamCommit Bot
authored and
Commit Bot
committed
[docs] Update Isolate.spawn doc to remove top-level function/static method restriction.
The restriction was lifted in 5f9ec9f. Fixes #50009 TESt=ci Change-Id: I5a6c063fe558d4dd305ec4c78bf998f4f3750c89 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260403 Reviewed-by: Martin Kustermann <[email protected]> Commit-Queue: Alexander Aprelev <[email protected]>
1 parent fea4065 commit 92638bf

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

sdk/lib/isolate/isolate.dart

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -293,15 +293,11 @@ class Isolate {
293293
/// The entry-point function is invoked in the new isolate with [message]
294294
/// as the only argument.
295295
///
296-
/// The function must be a top-level function or a static method
297-
/// that can be called with a single argument,
298-
/// that is, a compile-time constant function value
299-
/// which accepts at least one positional parameter
296+
/// The function must be such that it can be called with a single argument,
297+
/// that is, a function which accepts at least one positional parameter
300298
/// and has at most one required positional parameter.
301299
/// The function may accept any number of optional parameters,
302300
/// as long as it *can* be called with just a single argument.
303-
/// The function must not be the value of a function expression
304-
/// or an instance method tear-off.
305301
///
306302
/// Usually the initial [message] contains a [SendPort] so
307303
/// that the spawner and spawnee can communicate with each other.

0 commit comments

Comments
 (0)