I am writing a echoclient, as below:
Ptr!Conn conn = connect(127.0.0.1,8881);
ubyte[100] buf;
for(int i=0; iN; i++)
{
scope string str = format(%s,i);
conn.write((cast(ubyte*)str.ptr)[0..str.length]);
conn.read(buf[0..str.length]);
n++;
}
conn.close();
When it
I noticed that the cpu% falls from 99% down to 4% as well when
the throughput falls down.
On Tuesday, 26 May 2015 at 05:54:11 UTC, John Colvin wrote:
Something like this appears to work:
import std.typetuple : allSatisfy;
enum implicityConvertibleToBool(T) = is(T : bool);
bool tok_and(Args...)(lazy Args terms)
if(allSatisfy!(implicitlyConvertibleToBool, Args))
{
auto
On Tuesday, 26 May 2015 at 06:04:59 UTC, Tofu Ninja wrote:
On Tuesday, 26 May 2015 at 05:54:11 UTC, John Colvin wrote:
Something like this appears to work:
import std.typetuple : allSatisfy;
enum implicityConvertibleToBool(T) = is(T : bool);
bool tok_and(Args...)(lazy Args terms)
On 5/25/15 11:53 PM, Tofu Ninja wrote:
On Tuesday, 26 May 2015 at 05:43:59 UTC, Tofu Ninja wrote:
On Tuesday, 26 May 2015 at 05:22:26 UTC, Tofu Ninja wrote:
Actually the code seems to compile on 2.067.1 but definitely does not
work as expected.
...
I guess it stems from the fact that its lazy