Hi Andrew,

On Friday 23 October 2009 17:10:08 Andrew Meng wrote:
> For those who are using Javaspace, if you do not know the number of tasks
> having been written to space, how do you manage to terminate the loop(i.e,
> collecting result) when the Javaspace are empty? Javaspace.take() does not
> return null if there is no more entry in space.

Take a look at the takeIfExists method, which will return a null if no 
matching entry exists.  You can simply loop while a holding variable isn't 
null, calling takeIfExists on each loop.

Cheers,

-- 
Dominic Cleal
CDO2
88 Union Street
London
SE1 0NW
Tel: +44 (0)845 456 4460
Fax: +44 (0)845 456 4461
www.cdo2.com  www.cdovar.net

Reply via email to