Skip to content

Commit

Permalink
If the function is null Wait will not get called and will not check i…
Browse files Browse the repository at this point in the history
…f Future is in faulted state/raise the exception
  • Loading branch information
rubber-duck authored and migueldeicaza committed Mar 18, 2011
1 parent 2023fd5 commit cb86a2c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mcs/class/corlib/System.Threading.Tasks/Future.cs
Expand Up @@ -42,6 +42,8 @@ public class Task<TResult>: Task
get {
if (function != null)
Wait ();
else if (Exception != null)
throw Exception;
return value;
}
internal set {
Expand Down

0 comments on commit cb86a2c

Please sign in to comment.