Hello all,

This is my first post on these forums. I've been learning D for the past couple of months or so and have been quite impressed by the language thus far. One stumbling block that I have encountered is with using `shared`, and more specifically using `shared` with synchronization tools like Mutex and Condition.

Consider the following program:
https://gist.github.com/anibali/4d544c31ac762409d4ea

I can't seem to get the thing working without a bunch of casts to and from `shared`, which I'm assuming is not a good practice - it definitely doesn't make for nice-looking code.

I've found an old thread on a similar issue(http://forum.dlang.org/thread/moyyibrpnnmrrovyl...@forum.dlang.org) but there doesn't seem to be a conclusion there either.

Is `shared` in a workable state? Shouldn't Mutex, Condition, etc be shared since they are basically only ever useful when used in multiple threads? Am I missing the point completely?

Reply via email to