BREAKING CHANGE: Timer interface moved to dart:isolate

New breaking change for DART.

Post.

With revision

http://code.google.com/p/dart/source/detail?r=8987

the Timer interface moved to the “dart:isolate” library. This will
allow different environments (e.g. Dartium) to provide their own Timer
implementations making it easier to write portable code which relies
on an event loop and delayed execution.

Currently the only environment which has a working Timer
implementation is the standalone Dart VM binary. If you have been
using the Timer interface before, you will now need to import the
“dart:isolate” library instead of the “dart:io” library.

With this change other runtime environments such as Dartium or dart2js
can now provide an implementation of the Timer interface and I am sure
the individual teams will announce when they are ready.

-Ivan

P.S. It might well be that “dart:isolate” will not be the final
resting place of the Timer interface. Out of the existing libraries it
was the best fit at the moment. This question will be addressed as we
keep cleaning up our libraries.

Ivan Posva.


 Google+