fix(#46): infer resize operation

This commit is contained in:
Tomas Aparicio 2015-07-09 23:30:08 +01:00
parent 4678a066b6
commit 9db6f2a0ea
3 changed files with 78 additions and 37 deletions

View file

@ -78,11 +78,12 @@ func Initialize() {
C.vips_cache_set_max_mem(maxCacheMem)
C.vips_cache_set_max(maxCacheSize)
// Define a custom libvips thread concurrency limit (this may generate thread-unsafe issues)
// Define a custom thread concurrency limit in libvips (this may generate thread-unsafe issues)
// See: https://github.com/jcupitt/libvips/issues/261#issuecomment-92850414
if os.Getenv("VIPS_CONCURRENCY") == "" {
C.vips_concurrency_set(1)
}
// Enable libvips cache tracing
if os.Getenv("VIPS_TRACE") != "" {
C.vips_enable_cache_set_trace()
@ -91,7 +92,8 @@ func Initialize() {
initialized = true
}
// Thread-safe function to shutdown libvips. You could call this to drop caches as well.
// Thread-safe function to shutdown libvips.
// You can call this to drop caches as well.
// If libvips was already initialized, the function is no-op
func Shutdown() {
m.Lock()