On Thursday, 6 April 2017 at 13:52:01 UTC, deadalnix wrote:
Right now, there are no way to transfers ownership from one
thread to another, so you pretty much got to cast to shared,
move data to the other thread and then cast back to not shared.
(People who followed closely will notice that
On Wednesday, 5 April 2017 at 14:01:24 UTC, Guillaume Piolat
wrote:
Do we have a missed opportunity with shared?
Yes we do.
The #1 problem is that it lack a bridge to and from the "normal"
thread local world. there is literally no way to use shared in a
correct way, you always need to
On 06/04/17 12:37, Suliman wrote:
On Thursday, 6 April 2017 at 09:00:33 UTC, Kagamin wrote:
On Wednesday, 5 April 2017 at 14:01:24 UTC, Guillaume Piolat wrote:
My pet peeve with shared is the RoI.
Risk of infection?
Return of Investment :)
Actually, to be pedantic, it's "return *on*
On Thursday, 6 April 2017 at 09:00:33 UTC, Kagamin wrote:
On Wednesday, 5 April 2017 at 14:01:24 UTC, Guillaume Piolat
wrote:
My pet peeve with shared is the RoI.
Risk of infection?
Return of Investment :)
On Wednesday, 5 April 2017 at 14:01:24 UTC, Guillaume Piolat
wrote:
My pet peeve with shared is the RoI.
Risk of infection?
You were supposed to use it whenever something is "shared
across threads". My problem with it is with the RoI of putting
entire object graphs under that type
On Tuesday, 4 April 2017 at 21:56:37 UTC, Atila Neves wrote:
I feel dirty if I write `__gshared`. I sneeze when I read it.
But everytime I try and use `shared` I get trouble for it.
TIL that if I want a struct to be both `shared` and not,
destructors are out of the way. Because while
On Wednesday, 5 April 2017 at 13:18:26 UTC, Andrea Fontana wrote:
On Tuesday, 4 April 2017 at 21:56:37 UTC, Atila Neves wrote:
I feel dirty if I write `__gshared`. I sneeze when I read it.
But everytime I try and use `shared` I get trouble for it.
[...]
Atila
On Tuesday, 4 April 2017 at 21:56:37 UTC, Atila Neves wrote:
I feel dirty if I write `__gshared`. I sneeze when I read it.
But everytime I try and use `shared` I get trouble for it.
[...]
Atila
https://p0nce.github.io/d-idioms/#The-truth-about-shared
On Tuesday, 4 April 2017 at 21:56:37 UTC, Atila Neves wrote:
The reason why what I was trying to do isn't possible is
obvious in hindsight, but it's still annoying. So either code
duplication or mixins, huh?
template flag parameter for the struct for being shared or not? I
may well be
On Tuesday, April 04, 2017 21:56:37 Atila Neves via Digitalmars-d wrote:
> I feel dirty if I write `__gshared`. I sneeze when I read it.
Well, it was designed with C global variables in mind, and it's pretty risky
to use it for anything else, though you can get away with it if you're
careful.
I feel dirty if I write `__gshared`. I sneeze when I read it. But
everytime I try and use `shared` I get trouble for it.
TIL that if I want a struct to be both `shared` and not,
destructors are out of the way. Because while constructors are
easy because we can have more than one:
struct Foo
11 matches
Mail list logo