Skip to content

Inconsistency about scheduleTask() #182451

Description

@ahmedsameha1

At https://api.flutter.dev/flutter/scheduler/SchedulerBinding/scheduleTask.html, there is:

Tasks will be executed between frames, in priority order, excluding tasks that are skipped by the current schedulingStrategy. Tasks should be short (as in, up to a millisecond), so as to not cause the regular frame callbacks to get delayed.

At https://api.flutter.dev/flutter/foundation/compute.html, there is:

This is useful for operations that take longer than a few milliseconds, and which would therefore risk skipping frames. For tasks that will only take a few milliseconds, consider SchedulerBinding.scheduleTask instead.

I think that up to a millisecond is not consistent with a few milliseconds. This would cause confusion.
I would like to handle this, once it setteld down.

Metadata

Metadata

Assignees

Labels

P2Important issues not at the top of the work listd: api docsIssues with https://api.flutter.dev/team-frameworkOwned by Framework teamtriaged-frameworkTriaged by Framework team

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions