 	
 	static let maxIconSize = 48
 	
-	static func scaledForIcon(_ data: Data, imageResultBlock: @escaping (RSImage?) -> Void) {
-		DispatchQueue.global(qos: .default).async {
-			let image = RSImage.scaledForIcon(data)
-			DispatchQueue.main.async {
-				imageResultBlock(image)
-			}
-		}
+	static func scaledForIcon(_ data: Data, imageResultBlock: @escaping ImageResultBlock) {
+		IconScalerQueue.shared.scaledForIcon(data, imageResultBlock)
 	}
 
 	static func scaledForIcon(_ data: Data) -> RSImage? {

//  Copyright © 2019 Ranchero Software. All rights reserved.
//

#if os(macOS)
import AppKit
#else

		#endif		
	}
}

// MARK: - IconScalerQueue

private class IconScalerQueue {

	static let shared = IconScalerQueue()

	private let queue: DispatchQueue = {
		let q = DispatchQueue(label: "IconScaler", attributes: .initiallyInactive)
		q.setTarget(queue: DispatchQueue.global(qos: .default))
		q.activate()
		return q
	}()

	func scaledForIcon(_ data: Data, _ imageResultBlock: @escaping ImageResultBlock) {
		queue.async {
			let image = RSImage.scaledForIcon(data)
			DispatchQueue.main.async {
				imageResultBlock(image)
			}
		}
	}
}
