Unused druntime code: Barrier, ReadWriteMutex, Condition
Denis Feklushkin
feklushkin.denis at gmail.com
Tue Jun 16 10:35:45 UTC 2026
On Tuesday, 16 June 2026 at 08:23:11 UTC, Richard (Rikki) Andrew
Cattermole wrote:
>> This leads to duplication of code what already available in
>> `std.typecons.scoped`
>
> No.
>
> I did not suggest anything to do with scoped.
>
> All of the state and function calls to make it platform
> independent does not need to live in a class.
Condition class currently isn't cross-platform. Making it so is a
another separate task.
Moving it into Phobos for future generations to improvement would
be the best solution, in my opinion. (Just at the moment when the
rest druntime functionality for baremetal/multiplatform support
is ready, Phobos 3 will appear, in which this can be taken into
account.)
>>> Nothing needs to break to fix this.
>>
>> Why you use "break" to describe this?
>> I do not propose break anything: I propose to add `public
>> import` from `std.concurrency.rwmutex` (etc) into
>> `core.sync.rwmutex` module with appropriate deprecation
>> messages.
>
> Druntime cannot import phobos.
Oh, yes, you are right here.
But we can copy and paste code to Phobos and deprecate same code
in the drumtime for ~year.
Obvious, anyone using Barrier class will be able to change the
import line from core.sync.barrier to std.concurrency.barrier
More information about the Digitalmars-d
mailing list