On Tuesday, 6 September 2022 at 10:28:53 UTC, Loara wrote:
On Saturday, 3 September 2022 at 14:07:58 UTC, frame wrote:
Not exactly, a synchronized class member function becomes
automatically a shared one.
This is not present in official documentation so other
compilers different from `dmd` ar
On Saturday, 3 September 2022 at 14:07:58 UTC, frame wrote:
Not exactly, a synchronized class member function becomes
automatically a shared one.
This is not present in official documentation so other compilers
different from `dmd` aren't forced to assume it. This should be
consider an experi
On 9/4/22 11:24 PM, cc wrote:
On Saturday, 3 September 2022 at 14:37:16 UTC, Steven Schveighoffer wrote:
On 9/2/22 3:15 PM, cc wrote:
Tried casting away shared as a workaround but I assume that will
cause some kind of TLS catastrophe.
I think it will be fine, but you may have an issue. You
On Saturday, 3 September 2022 at 14:37:16 UTC, Steven
Schveighoffer wrote:
On 9/2/22 3:15 PM, cc wrote:
Tried casting away shared as a workaround but I assume that
will cause some kind of TLS catastrophe.
I think it will be fine, but you may have an issue. You are
returning a non-shared `V
On 9/2/22 3:15 PM, cc wrote:
Tried casting away shared as a workaround but I assume that will cause
some kind of TLS catastrophe.
I think it will be fine, but you may have an issue. You are returning a
non-shared `VAL`, but your class is `shared`, which means `table`, and
all the `VAL` and
On Saturday, 3 September 2022 at 09:49:54 UTC, Loara wrote:
In current version of D language `synchronized` and `shared`
are independent. In particular `shared` should be used only for
basic types like integers for which atomic operations are well
defined, and not for classes.
Not exactly, a
On Friday, 2 September 2022 at 19:15:45 UTC, cc wrote:
```d
synchronized class SyncTable(KEY, VAL) {
private VAL[KEY] table;
auto require(KEY key) {
return table.require(key);
}
}
auto table = new shared SyncTable!(string, string);
table.require("abc");
``
```d
synchronized class SyncTable(KEY, VAL) {
private VAL[KEY] table;
auto require(KEY key) {
return table.require(key);
}
}
auto table = new shared SyncTable!(string, string);
table.require("abc");
```
Fails to compile:
```
// Error: none of the overloads