taskpipeline 0.0.5 copy "taskpipeline: ^0.0.5" to clipboard
taskpipeline: ^0.0.5 copied to clipboard

Control future start or stop (not really, but return null immediately), that is really useful for development in fact.

0.0.1 #

  • 通过 TaskPipeline,控制全部 Task 的执行与结束.
  • TaskPipeline 可以执行内部 Task,并提供 4 种执行回调方法:
/// 内部 Task 回调,需要消息数据
typedef MessageTaskExecutor<T, Q> = Future<Q> Function(T data, TaskPipeline childPipeline);

/// 内部 Task 回调,需要消息数据,但是不需要子 Pipeline
typedef LeafMessageTaskExecutor<T, Q> = Future<Q> Function(T data);

/// 内部 Task 回调,不需要消息数据
typedef TaskExecutor<Q> = Future<Q> Function(TaskPipeline childPipeline);

/// 内部 Task 回调,不需要消息数据,也不需要子 Pipeline
typedef LeafTaskExecutor<Q> = Future<Q> Function();

MessageTaskExecutor<T, Q> msgExec;
LeafMessageTaskExecutor<T, Q> leafMsgExec;
TaskExecutor<Q> exec;
LeafTaskExecutor<Q> leafExec;

以上四种执行回调同一时间只有一种可以生效.

  • TaskPipeline 可以执行共享 Task
  • TaskPipeline 可以终结 Task

0.0.2 #

  • 执行内部 Task 时可以执行同步方法

0.0.3 #

  • 调整代码风格
  • _TaskCompleter 改造成 ProxyCompleter,可以单独作为一个工具来使用

0.0.4 #

  • TaskPipeline 现在可以 forkTaskPipeline 进行独立操作,生命周期跟随主 TaskPipeline.

0.0.5 #

  • 修复在 Flutter web 编译器编译后发生的逻辑错误
0
likes
30
points
27
downloads

Publisher

unverified uploader

Weekly Downloads

Control future start or stop (not really, but return null immediately), that is really useful for development in fact.

Repository (GitHub)
View/report issues

License

BSD-2-Clause (license)

More

Packages that depend on taskpipeline