0.1.0-beta.1
0.1.0-beta.1 是 tasklane 的首个公开预发布版本,确立了跨浏览器 Web Worker 与 Node.js worker_threads 的统一任务运行时架构。
主要变化摘要
- 跨平台统一运行时与
Scope生命周期:提供应用级WorkerRuntime与可嵌套的RuntimeScope,支持基于releasedACK 的确定性资源清理屏障。 - 有界优先级与公平调度:支持
interactive、foreground、background三级优先级、可选老化提升(ageing)、group组间公平索引堆调度以及大任务预算等待保护。 - 显式数据所有权与结果背压:通过
transferBuffers()与output()显式管理ArrayBuffer零拷贝转移;通过inputBytes、scratchBytes、outputBytes、cacheBytes账本与ResultLease实现端到端背压。 - 取消模式、亲和性与状态型
Session:提供cooperative、discard、terminate三种取消模式,支持软亲和性(affinity)、独占WorkerSession以及按作用域隔离的本地ScopedCache与ScratchArena。 - 协议代际与全套验证矩阵:引入 Worker
epoch代际隔离、有界进度流控、阶段耗时统计(TaskTiming),并通过 Node.js 与三大浏览器的大规模坐标转换及取消风暴测试。
原始记录
以下内容完整保留 tasklane CHANGELOG 中此版本的英文原文,供核对完整技术变更:
First beta release of tasklane with:
- browser Web Worker and Node.js worker_threads adapters
- scoped lifecycle and bounded scheduling
- priority, ageing and fair task admission
- explicit Transferable ownership
- input, scratch, output and cache budgets
- ResultLease backpressure
- cooperative, discard and terminate cancellation modes
- worker affinity and stateful sessions
- worker-local bounded caches
- protocol generation and failure handling
- runtime metrics and timing
- browser, stress and large-data conversion verification
Reliability and scheduling
Indexed group scheduling, bounded fairness history and waiting-budget protection.
Physical phase validation, bounded progress with ACKs, and confirmed scope cleanup (protocol v3).
Explicit resident-resource disposal, discarded-result tasks, lease count limits and termination recovery.
Independent metadata traversal limits and a real-Worker scheduler benchmark.
Bounded wire packets account for scalar and graph metadata; results decode on consumption.
Synchronous-only prepare rejects hanging promises; asynchronous preparation belongs in Worker handlers.
Strict priority defaults, measured scratch arenas, and metadata-aware ordinary cache accounting.
Deterministic Node endpoint retirement tests and real Worker error/termination races.