Re: Shared, but synchronisation is not desired for multithreading

2016-06-05 Thread Jonathan M Davis via Digitalmars-d
On Saturday, June 04, 2016 16:56:21 tcak via Digitalmars-d wrote: > On Saturday, 4 June 2016 at 15:51:22 UTC, Alex Parrill wrote: > > (It also doesn't help that many "thread-safe" functions in D > > aren't marked as shared where they really ought to be, ex. all > > the functions in

Re: Shared, but synchronisation is not desired for multithreading

2016-06-04 Thread tcak via Digitalmars-d
On Saturday, 4 June 2016 at 15:51:22 UTC, Alex Parrill wrote: (It also doesn't help that many "thread-safe" functions in D aren't marked as shared where they really ought to be, ex. all the functions in core.sync.mutex) And you have to be continuously casting the methods of Mutex, Thread,

Re: Shared, but synchronisation is not desired for multithreading

2016-06-04 Thread Alex Parrill via Digitalmars-d
On Saturday, 4 June 2016 at 15:11:51 UTC, tcak wrote: If you ignore the discouraged __gshared keyword, to be able to share a variable between threads, you need to be using "shared" keyword. While designing your class with "shared" methods, the compiler directly assumes that objects of this

Shared, but synchronisation is not desired for multithreading

2016-06-04 Thread tcak via Digitalmars-d
If you ignore the discouraged __gshared keyword, to be able to share a variable between threads, you need to be using "shared" keyword. While designing your class with "shared" methods, the compiler directly assumes that objects of this class must be protected against threading problems.