[Package-Manager] Fixed code to avoid deadlock in async methods
authorDinesh Dwivedi <dinesh.d@samsung.com>
Wed, 29 Jun 2016 12:39:30 +0000 (18:09 +0530)
committerDinesh Dwivedi <dinesh.d@samsung.com>
Tue, 12 Jul 2016 10:17:43 +0000 (19:17 +0900)
Change-Id: I5ec1d9075757215646024302af30c9445468156f
Signed-off-by: Dinesh Dwivedi <dinesh.d@samsung.com>
Tizen.Applications/Tizen.Applications/Package.cs
Tizen.Applications/Tizen.Applications/PackageManager.cs

index 8b8bf45..f993dd7 100644 (file)
@@ -194,7 +194,7 @@ namespace Tizen.Applications
             {
                 tcs.TrySetException(PackageManagerErrorFactory.GetException(err, "Failed to get total package size info"));
             }
-            return await tcs.Task;
+            return await tcs.Task.ConfigureAwait(false);
         }
 
         // This method assumes that given arguments are already validated and have valid values.
index 4a917c2..31c3bda 100755 (executable)
@@ -223,7 +223,7 @@ namespace Tizen.Applications
             {
                 tcs.TrySetException(PackageManagerErrorFactory.GetException(err, "Failed to get total package size info"));
             }
-            return await tcs.Task;
+            return await tcs.Task.ConfigureAwait(false);
         }
 
         /// <summary>