equal
deleted
inserted
replaced
49 // |
49 // |
50 CThumbnailTask::~CThumbnailTask() |
50 CThumbnailTask::~CThumbnailTask() |
51 { |
51 { |
52 Cancel(); |
52 Cancel(); |
53 CancelMessage(); |
53 CancelMessage(); |
|
54 |
|
55 iClientThread.Close(); |
54 } |
56 } |
55 |
57 |
56 |
58 |
57 // --------------------------------------------------------------------------- |
59 // --------------------------------------------------------------------------- |
58 // CThumbnailTask::Priority() |
60 // CThumbnailTask::Priority() |
223 iMessage.Complete( KErrCancel ); |
225 iMessage.Complete( KErrCancel ); |
224 ResetMessageData(); |
226 ResetMessageData(); |
225 } |
227 } |
226 } |
228 } |
227 |
229 |
|
230 // --------------------------------------------------------------------------- |
|
231 // CThumbnailTask::ClientThreadAlive() |
|
232 // Checks if client thread is still alive and RMessage2 handle valid. |
|
233 // --------------------------------------------------------------------------- |
|
234 // |
|
235 TBool CThumbnailTask::ClientThreadAlive(const TBool aGetThread) |
|
236 { |
|
237 if ( iMessage.Handle()) |
|
238 { |
|
239 if (aGetThread) |
|
240 { |
|
241 // get client thread |
|
242 TInt err = iMessage.Client( iClientThread ); |
|
243 if (err != KErrNone) |
|
244 { |
|
245 TN_DEBUG2( "CThumbnailTask(0x%08x)::ClientThreadAlive() - client thread not found", this); |
|
246 |
|
247 ResetMessageData(); |
|
248 |
|
249 return EFalse; |
|
250 } |
|
251 } |
|
252 |
|
253 // check if client thread alive |
|
254 TExitType exitType = iClientThread.ExitType(); |
|
255 if( exitType != EExitPending ) |
|
256 { |
|
257 TN_DEBUG2( "CThumbnailTask(0x%08x)::ClientThreadAlive() - client thread died", this); |
|
258 |
|
259 ResetMessageData(); |
|
260 |
|
261 return EFalse; |
|
262 } |
|
263 else |
|
264 { |
|
265 // all OK |
|
266 return ETrue; |
|
267 } |
|
268 } |
|
269 else |
|
270 { |
|
271 return EFalse; |
|
272 } |
|
273 } |
|
274 |
228 // End of file |
275 // End of file |