Check whether a range is empty

vino.B bheeman.vino at hotmail.com
Sat Jul 14 14:28:52 UTC 2018


On Friday, 13 July 2018 at 19:45:03 UTC, Steven Schveighoffer 
wrote:
> On 7/13/18 3:29 PM, vino.B wrote:
>>  [...]
>
>
> Well, empty is how you detect whether any range is empty, and 
> as far as ranges are concerned, your code is correctly checking 
> for empty.
>
> A couple comments:
>
> 1. Why are you using chain with a single parameter? That just 
> returns its parameter.
> 2. You may want to try grabbing the range ONCE. i.e.:
>
> auto r = PFresult.toRange;
> if(!r.empty)
> {
>    foreach(i; r) ...
> }
>
> I'm not familiar with how taskPool works, so I don't know the 
> real answer.
>
> -Steve

Hi Steve,

  i Tried your method no luck, it just prints blank lines.

From,
Vino.B


More information about the Digitalmars-d-learn mailing list