[concurrency-interest] is choice beteen asynchrone/synchrone methodan implementation detail?

Peter Veentjer alarmnummer at gmail.com
Wed Jul 26 01:22:28 EDT 2006


> I disagree, because making them asynchronous if the contract reports
> otherwise is fallacious and may break lexical guarantees. To take your
> own example:
That is why the could is between quotes... you could... it doesn't
mean you should :)

>
> public interface CookableFood {
> /**
>   * When this method returns food is cooked
>   */
>   public void cook();
> }
>
> //usage scenario:
> CookableFood c = CookerFactory.getMisbehavingImpl();
>
> c.cook();
> waiter.serveCookedFood(c); //c may not yet be cooked leading to a
> synchronization requirement, thus breaking the contract set by
> CookableFood
>


More information about the Concurrency-interest mailing list