Threading Questions
bitwise via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sun Oct 4 07:42:48 PDT 2015
On Tuesday, 29 September 2015 at 23:20:31 UTC, Steven
Schveighoffer wrote:
>
> yeah, that could probably be done. One thing to note is that
> these classes are from ages ago (probably close to 10 years).
> New API suggestions may be allowed.
>
>
> -Steve
I'm still thinking about my last rant, here... So by new API, do
you mean just adding a couple of new functions, or rewriting a
new Condition class(as is the plan for streams)?
Since D is moving towards a phobos with no GC, what will happen
to things that are classes like Condition and Mutex?
If DIP74 were implemented, Condition and Mutex could be made ref
counted, but DIP74 seems like something that will be very
complicated, and may not happen for a long time.
So the only other alternative is to make it a struct, but for a
Mutex, that would prevent you from doing this:
Mutex m = new Mutex();
synchronized(m) { }
I also don't mind the way that the current streams are made up of
a class hierarchy.
Although inheritance is overused sometimes, I don't think it's
bad. But, if I'm correct about the current trend in D, it seems
any new stream stuff will end up getting flattened into some
template/struct solution.
Any comments on this?
Thanks,
Bit
More information about the Digitalmars-d-learn
mailing list