package task

import (
	
	
)

// Contextify adds context cancellation support to the task using the given
// shutdown function.
func ( func() error,  func()) Task {
	return func( context.Context) error {
		 := make(chan struct{})

		var  sync.WaitGroup
		.Add(1)

		go func() {
			defer .Done()
			select {
			case <-:
			case <-.Done():
				()
			}
		}()

		 := ()

		close()
		.Wait()

		return 
	}
}