Fix to disable all tests for in-flight cancellation off the async loading path 61/25661/5
authorAndrew Cox <andrew.cox@partner.samsung.com>
Thu, 7 Aug 2014 16:05:48 +0000 (17:05 +0100)
committerAndrew Cox <andrew.cox@partner.samsung.com>
Mon, 11 Aug 2014 10:49:48 +0000 (11:49 +0100)
commitf3808464393f7389893e2964f057a78416215198
tree465a6db8ee9a636e69919d183c2641fba45e75aa
parent575dea0f6d59f501f79d3ef4d5b1657e9b46e4b4
Fix to disable all tests for in-flight cancellation off the async loading path

[problem]
When loading nine-patch images, an interruption exception could be
thrown on a thread that doesn't handle them.

[cause]
Our standard loading path involves two threads at a time coordinating on
cancellation of resource loads that have already been started.
Nine-patch images are a special case that execute image loading file IO
and decoding to bitmaps directly on the event thread, thus introducing a
third thread into this mix.
The event thread was not considered in the design or the reviews of the
late image cancelation feature.

[solution]
Make all image loading paths other than the main async one on a
background thread use a stubbed NOP implementation of the interface that
lets such loading paths interrupt themselves.
Thus the nine-patch loading path can never be interrupted.

No currently-commited demos show this issue but the following patch
fails without this one and works after it is applied:
https://review.tizen.org/gerrit/25392

Change-Id: Id5adeebb95b41eac1414e58b8ab61e560ad1a585
Signed-off-by: Andrew Cox <andrew.cox@partner.samsung.com>
platform-abstractions/slp/resource-loader/resource-loading-client.h
platform-abstractions/slp/resource-loader/resource-thread-image.cpp
platform-abstractions/slp/resource-loader/resource-thread-image.h