MCPcopy
hub / github.com/mudler/LocalAI / StoreCancellation

Method StoreCancellation

core/services/galleryop/service.go:444–446  ·  view source on GitHub ↗

StoreCancellation is a public method to store a cancellation function for an operation This allows cancellation functions to be stored immediately when operations are created, enabling cancellation of queued operations that haven't started processing yet.

(id string, cancelFunc context.CancelFunc)

Source from the content-addressed store, hash-verified

442// This allows cancellation functions to be stored immediately when operations are created,
443// enabling cancellation of queued operations that haven't started processing yet.
444func (g *GalleryService) StoreCancellation(id string, cancelFunc context.CancelFunc) {
445 g.storeCancellation(id, cancelFunc)
446}
447
448// removeCancellation removes a cancellation function when operation completes
449func (g *GalleryService) removeCancellation(id string) {

Callers 4

RegisterUIAPIRoutesFunction · 0.80

Calls 1

storeCancellationMethod · 0.95

Tested by

no test coverage detected