-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
DART Cookbook
By :
The isolate library only gives us the low-level, basic building blocks, so working with isolates in a realistic application environment can be challenging. Specifically for this purpose, the worker concurrent task executor framework was developed by Diego Rocha, available from pub package manager. It was made to abstract all the isolate managing and message passing and make concurrency in Dart as easy as possible. Worker also contains built-in error handling, so you needn't worry about that either. This recipe will show you how to use this framework so that you can concentrate on higher-level application details.
In the project using_worker, you can find a number of programs (using_worker1 through using_worker4) illustrating the use of this framework. The script using_worker.dart illustrates the main steps, namely creating a task, creating a worker, give a task to the worker, and process the results:
import'package:worker/worker.dart...
Change the font size
Change margin width
Change background colour