Minimize lock time

2010-06-09 Thread Kagamin
Let's consider the following code: synchronized(syncRoot) { if(condition)opSuccess(); else writeln(possibly,slow); } Suppose the else close doesn't need to be executed in lock domain and can be slow. How to minimize lock time here? synchronized(syncRoot) { if(condition)opSuccess(); else

Re: template specialization

2010-06-09 Thread Trass3r
Please write one, overloading of functions with templates is an important and basic thing. http://d.puremagic.com/issues/show_bug.cgi?id=3941

Re: dsss build, tango, GC ?

2010-06-09 Thread Fred Burton
> I think that the GC doesn't give back memory to the system. It keeps it > for future use. Ah, but I'm seeing the memory usage increasing over time still... for a test run of some sort, my largest loss record is: ==3191== 16,240,909 bytes in 35,757 blocks are definitely lost in loss record 1,

Re: dsss build, tango, GC ?

2010-06-09 Thread Jacob Carlborg
On 2010-06-09 21:16, Fred Burton wrote: Hi, I have (sort of) 2 questions: Background: I was doing some coding using Phobos, and recently switched to using Tango. 1. I'm trying to build using dsss and it says : /usr/bin/ld: cannot find -lphobos collect2: ld returned 1 exit status --- errorlevel

dsss build, tango, GC ?

2010-06-09 Thread Fred Burton
Hi, I have (sort of) 2 questions: Background: I was doing some coding using Phobos, and recently switched to using Tango. 1. I'm trying to build using dsss and it says : /usr/bin/ld: cannot find -lphobos collect2: ld returned 1 exit status --- errorlevel 1 Command /usr/bin/rebuild returned with c

Re: template specialization

2010-06-09 Thread bearophile
Steven Schveighoffer: > I know this is planned, because it's in TDPL. BTW, are there any bug > reports for this? Please write one, overloading of functions with templates is an important and basic thing. Bye, bearophile

Re: template specialization

2010-06-09 Thread Steven Schveighoffer
On Tue, 08 Jun 2010 17:25:43 -0400, Larry Luther wrote: This code: import std.stdio; class A { void get (T:ubyte)(T[] buffer) { writefln( "get (T:ubyte)(T[] buffer)\n"); } void get (T:byte)(T[] buffer) { writefln( "get (T:byte)(T[] buffer)\n"); } void get (T)(T[] buffe

Re: template specialization

2010-06-09 Thread Steven Schveighoffer
On Tue, 08 Jun 2010 17:25:43 -0400, Larry Luther wrote: This code: import std.stdio; class A { void get (T:ubyte)(T[] buffer) { writefln( "get (T:ubyte)(T[] buffer)\n"); } void get (T:byte)(T[] buffer) { writefln( "get (T:byte)(T[] buffer)\n"); } void get (T)(T[] buffe