- Shared <-> Unshared is never implicit, either requiring an explicit cast (both ways) or having a language support which allows the conversion gracefully. - Shared methods are called by compiler if the type is shared or if there is no unshared equivalent. - Programmer needs to guarantee that shared -> unshared cast/conversion is thread-safe by hand; such as acquiring a lock, atomic operations... - Programmer needs to guarantee that when unshared -> shared cast/conversion happens, data is not accessed through unshared reference during the lifetime of shared reference(s). Effectively this means a data needs to be treated as shared everywhere at the same time otherwise all things fall apart.
I don't see any problem with this proposal as long as these
points hold:
- Re: share... Walter Bright via Digitalmars-d
- Re: share... Manu via Digitalmars-d
- Re: share... Walter Bright via Digitalmars-d
- Re: share... rikki cattermole via Digitalmars-d
- Re: share... Manu via Digitalmars-d
- Re: share... Manu via Digitalmars-d
- Re: share... Joakim via Digitalmars-d
- Re: share... Stanislav Blinov via Digitalmars-d
- Re: share... Atila Neves via Digitalmars-d
- Re: share... John Colvin via Digitalmars-d
- Re: shared - i need it to be useful NX via Digitalmars-d
- Re: shared - i need it to be useful Atila Neves via Digitalmars-d
- Re: shared - i need it to be u... Steven Schveighoffer via Digitalmars-d
- Re: shared - i need it to ... Atila Neves via Digitalmars-d
- Re: shared - i need it to be u... Stanislav Blinov via Digitalmars-d
- Re: shared - i need it to ... Steven Schveighoffer via Digitalmars-d
- Re: shared - i need it... Stanislav Blinov via Digitalmars-d
- Re: shared - i nee... Steven Schveighoffer via Digitalmars-d
- Re: shared - i need it... Timon Gehr via Digitalmars-d
- Re: shared - i nee... Stanislav Blinov via Digitalmars-d
- Re: shared - ... Timon Gehr via Digitalmars-d