MCPcopy Index your code
hub / github.com/cshum/imagor / Shutdown

Method Shutdown

processor/vipsprocessor/processor.go:191–209  ·  view source on GitHub ↗

Shutdown implements imagor.Processor interface

(ctx context.Context)

Source from the content-addressed store, hash-verified

189
190// Shutdown implements imagor.Processor interface
191func (v *Processor) Shutdown(ctx context.Context) error {
192 processorLock.Lock()
193 defer processorLock.Unlock()
194 if processorCount <= 0 {
195 return nil
196 }
197 processorCount--
198 if processorCount == 0 {
199 vips.Shutdown()
200 }
201 if v.cache != nil {
202 v.cache.Close()
203 v.cache = nil
204 }
205 for _, d := range v.Detectors {
206 _ = d.Shutdown(ctx)
207 }
208 return nil
209}
210
211func (v *Processor) newSourceReaderFromBlob(blob *imagor.Blob) (io.ReadCloser, error) {
212 reader, _, err := blob.NewReadSeeker()

Callers 1

TestProcessorFunction · 0.95

Implementers 4

cacherProcessorimagor_test.go
Processorprocessor/vipsprocessor/processor.go
testProcessorserver/server_test.go
slowTestProcessorserver/server_test.go

Calls 2

ShutdownMethod · 0.65
CloseMethod · 0.45

Tested by 1

TestProcessorFunction · 0.76