﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
10920	[patch] Stop image thumbnail loading if thumbnails are not shown	holgermappt	team	"Here is a patch that adds the function `stopLoadThumbs()` that stops geo image thumbnail loading if thumbnails are not needed anymore.  The thumbnail load is continued the next time `loadThumbs()` is called.  The JOSM revision needs to be inserted for function `stopLoadThumbs()` (`@since tbd`).

Please review the thread synchronization, my experience in that area is limited.  I think a new thumbnail loader should wait if another loader is still running, but such an implementation might be too complicated compared to the actual problem.

One corner case is a sequence of `setUseThumbs(true); setUseThumbs(false); setUseThumbs(true); ...`.  That would start multiple threads, each thread with a new ThumbsLoader instance.  They potentially all work on the same image in parallel.  Most of the loaders will stop after they processed one file.

An other corner case is a layer merge while thumbnails are loaded.  The thumbnail loaders are stopped on both layers in that case.  `thumbsLoaded` will be false in that case and the next `paint()` will continue to load thumbnails if `useThumbs` is true.

The patch originates from ticket:10854.
"	enhancement	new	minor		Core image mapping				
