reef-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Julia Wang (QIUHE)" <Qiuhe.W...@microsoft.com>
Subject RE: ICompletedTask semantics
Date Fri, 08 Apr 2016 21:04:25 GMT
We discussed the same topic in last Nov :)

-----Original Message-----
From: Tony Majestro [mailto:tmajest@microsoft.com] 
Sent: Friday, April 8, 2016 1:10 PM
To: dev@reef.apache.org
Subject: RE: ICompletedTask semantics

> `ITask` has only one method, and as part of its exit, it needs to release all resources.
Failure to do so would be a task failure.

Even if ITask documents the above, it would be more idiomatic to just implement the IDisposable
interface. It's a very explicit way of stating that this class might have resources that need
cleaned up.

-----Original Message-----
From: Markus Weimer [mailto:markus@weimo.de]
Sent: Friday, April 8, 2016 12:50 PM
To: dev@reef.apache.org
Subject: Re: ICompletedTask semantics

On 2016-04-08 11:40, Andrew Chung wrote:
> Examples include Dispose methods that modify states in external 
> systems, e.g. releasing distributed lock.

Fair. However, I don't understand why `ITask` needs to be `Disposable` in the first place.
`ITask` has only one method, and as part of its exit, it needs to release all resources. Failure
to do so would be a task failure.

In other words, I don't see anyone writing something like `using(var t = new MyTask()){...}`.

Markus
Mime
View raw message