Unused druntime code: Barrier, ReadWriteMutex, Condition

Denis Feklushkin feklushkin.denis at gmail.com
Mon Jun 15 09:41:00 UTC 2026


On Monday, 15 June 2026 at 09:07:54 UTC, Richard (Rikki) Andrew 
Cattermole wrote:

> There are enough primitives in FreeRTOS to build these other 
> sync primitives.

Strictly, my question wasn't related to FreeRTOS.

I just want to understand why we keep such code that we don't use 
directly in the druntime. This code complicates porting without 
providing any benefit. Moving this code to Phobos allows us to 
put this issue aside along with other similar ones (like std.file 
on systems without filesystem)

One day we'll have to quickly port the language to something 
trendy. And we won't be ready for it.

> There are enough primitives in FreeRTOS to build these other 
> sync primitives.

Most likely, these primitives do not exist in any OS - they are 
too high-level and can be implemented on the basis of "more 
primitive" primitives. (Posix implementation just provides 
convient wrapper, I think)



More information about the Digitalmars-d mailing list