TimelineTask class

An asynchronous task on the timeline. An asynchronous task can have many (nested) synchronous operations. Synchronous operations can live longer than the current isolate event. To pass a TimelineTask to another isolate, you must first call pass to get the task id and then construct a new TimelineTask in the other isolate.

Constructors

TimelineTask()

Create a task. The task ID will be set by the system.

TimelineTask.withTaskId(int taskId)

Create a task with an explicit taskId. This is useful if you are passing a task from one isolate to another.

Properties

hashCodeint
read-only, inherited

The hash code for this object.

runtimeTypeType
read-only, inherited

A representation of the runtime type of the object.

Operators

operator ==(other) → bool
inherited

The equality operator.

Methods

finish() → void

Finish the last synchronous operation that was started.

instant(String name, { Map arguments }) → void

Emit an instant event for this task.

pass() → int

Retrieve the TimelineTask's task id. Will throw an exception if the stack is not empty.

start(String name, { Map arguments }) → void

Start a synchronous operation within this task named name. Optionally takes a Map of arguments.

noSuchMethod(Invocation invocation) → dynamic
inherited

Invoked when a non-existent method or property is accessed.

toString() → String
inherited

Returns a string representation of this object.

© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dartlang.org/stable/1.24.3/dart-developer/TimelineTask-class.html