Skip to content

Releases: Janlaywss/priority-worker-runner

0.1.0

24 Mar 08:05

Choose a tag to compare

🥳 feat: add cleanup effect api, Used to clean up the side effects of running tasks

const runner = new TaskRunner<Task>(({task}) => {
    let timeRef: TimeRef = {value: undefined};
    const cleanup = () => {
        clearTimeout(timeRef.value);
    }
    const handle = async () => {
        const event = task.event;
        if (event === 'timeout') {
            return await timeoutTask(timeRef);
        }
    }
    return {handle, cleanup}
}, {
    concurrentExecuteTaskMax: 5,
    timeout: 5,
});

0.0.3

11 Mar 06:46

Choose a tag to compare

0.0.2

10 Mar 18:08

Choose a tag to compare

first version