VisualD: Error disabling access to shared memory objects
Nuno Leiria
omniparagon at hotmail.com
Mon Sep 28 22:10:58 UTC 2020
If I enable "disable access to shared memory objects (DMD
2.088+)" then this simple example doesn't compile:
void main()
{
string line;
while ((line = stdin.readln()) !is null)
write(line);
}
It fails with the error:
C:\D\dmd-2.094.0\windows\bin\..\..\src\phobos\std\stdio.d-mixin-4874(4874): Error: direct access to shared `stdin` is not allowed, see `core.atomic`
Can anyone explain why?
More information about the Digitalmars-d-ide
mailing list