Does D have equivalent of Java util.concurrent?

Heromyth bitworld at qq.com
Fri May 17 06:36:05 UTC 2019


On Sunday, 28 April 2019 at 08:27:31 UTC, Dibyendu Majumdar wrote:
> On Sunday, 28 April 2019 at 01:22:32 UTC, Heromyth wrote:
>> On Saturday, 27 April 2019 at 14:15:01 UTC, Dibyendu Majumdar 
>> wrote:
>>> Java programmers have benefited hugely from Doug Lea's work 
>>> (http://gee.cs.oswego.edu/dl/concurrency-interest/index.html). I was wondering if D's library has anything equivalent. If not, I am interested in porting Doug Lea's library from Java to D; I think the license allows this, but I will check with Doug Lea.
>>
>> We have done somthing about this. See here:
>>
>> Source: 
>> https://github.com/huntlabs/hunt/tree/master/source/hunt/concurrency
>> Examples: 
>> https://github.com/huntlabs/hunt/tree/master/examples/UnitTest/source/test
>>
>> Current stage: We are trying to port the CompletableFuture.
>
> Nice. Some questions:
>
> Have you based this on the Java8 version from Doug Lea's 
> repository? Presumably this isn't a port of Oracle's version?
> The concurrent collections aren't ported, am I right?
>
> BTW Doug Lea's copyright notice should be retained in the 
> sources if you have ported his code.

The most copyright notices are retained. All the code are porting 
from OpenJDK 8/11.

The porting of CompletableFuture done. The 20 examples from [1] 
are passed, see [2].

The next step is make CompletableFuture support value type like 
int, string etc.

[1] 
https://mahmoudanouti.wordpress.com/2018/01/26/20-examples-of-using-javas-completablefuture/
[2] 
https://github.com/huntlabs/hunt/blob/master/examples/UnitTest/source/test/CompletableFutureTest.d


More information about the Digitalmars-d mailing list