Skip to content
This repository was archived by the owner on Feb 22, 2018. It is now read-only.
This repository was archived by the owner on Feb 22, 2018. It is now read-only.

Scope should be able to handle a zone's microtask #976

Closed
@mvuksano

Description

@mvuksano

As an example (mhevery@2675da0) zone should be able to handle microtasks.

zone.onTurnStart = () {
  log('onTurnStart(begin)');
  log('onTurnStart(end)');
};
zone.onTurnDone = () {
  log('onTurnDone(begin)');
  scheduleMicrotask(() { log('executeMicrotask'); });
  log('onTurnDone(end)');
};
zon.onScheduleMicrotask = (microTaskFn) {
  log('onScheduleMicrotask(begin)');
  microTaskFn();
  log('onScheduleMicrotask(end)');
};
zone.run(() {
  log('run');
});

We should get the following sequence:

onTurnStart(begin); onTurnStart(end); run; onTurnDone(begin); onScheduleMicrotask(begin); executeMicrotask; onScheduleMicrotask(end); onTurnDone(end);

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions