MCPcopy
hub / github.com/QwikDev/qwik / cleanupTask

Function cleanupTask

packages/qwik/src/core/use/use-task.ts:786–796  ·  view source on GitHub ↗
(task: SubscriberEffect)

Source from the content-addressed store, hash-verified

784};
785
786export const cleanupTask = (task: SubscriberEffect) => {
787 const destroy = task.$destroy$;
788 if (destroy) {
789 task.$destroy$ = undefined;
790 try {
791 destroy();
792 } catch (err) {
793 logError(err);
794 }
795 }
796};
797
798export const destroyTask = (task: SubscriberEffect) => {
799 if (task.$flags$ & TaskFlagsIsCleanup) {

Callers 4

runResourceFunction · 0.85
runTaskFunction · 0.85
runComputedFunction · 0.85
destroyTaskFunction · 0.85

Calls 1

logErrorFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…