Re: [MSEide-MSEgui-talk] MSElang, long strings and dynamic arrays are not thread safe

2014-05-12 Thread Michael Schnell
On 05/11/2014 10:50 AM, Martin Schreiber wrote: Have you ever concurrentely read strings from different threads? I do this all the time. -Michael -- Accelerate Dev Cycles with Automated Cross-Browser Testing - For

Re: [MSEide-MSEgui-talk] MSElang, long strings and dynamic arrays are not thread safe

2014-05-12 Thread Michael Schnell
On 05/11/2014 08:06 AM, Martin Schreiber wrote: Hi, Because of the big overhead by locked refcount operations and memory barriers long strings and dynamic arrays are not thread safe, even reading needs serializing if the data will be accessed from several threads. In exactly what environment

Re: [MSEide-MSEgui-talk] MSElang, long strings and dynamic arrays are not thread safe

2014-05-12 Thread Martin Schreiber
On Monday 12 May 2014 09:37:25 Michael Schnell wrote: On 05/11/2014 08:06 AM, Martin Schreiber wrote: Hi, Because of the big overhead by locked refcount operations and memory barriers long strings and dynamic arrays are not thread safe, even reading needs serializing if the data will be

Re: [MSEide-MSEgui-talk] MSElang, long strings and dynamic arrays are not thread safe

2014-05-12 Thread Michael Schnell
On 05/12/2014 10:40 AM, Martin Schreiber wrote: AFAIK memory barriers are extremely evil. Of course with modern CPUs this is correct. Anyway, not allowing normal seemingly innocent language types for ubiquitous use asks for an infinite count of problems. -Michael

Re: [MSEide-MSEgui-talk] MSElang, long strings and dynamic arrays are not thread safe

2014-05-12 Thread Martin Schreiber
On Monday 12 May 2014 10:57:27 Michael Schnell wrote: On 05/12/2014 10:40 AM, Martin Schreiber wrote: AFAIK memory barriers are extremely evil. Of course with modern CPUs this is correct. Anyway, not allowing normal seemingly innocent language types for ubiquitous use asks for an infinite

Re: [MSEide-MSEgui-talk] MSElang, long strings and dynamic arrays are not thread safe

2014-05-12 Thread Michael Schnell
On 05/12/2014 11:02 AM, Martin Schreiber wrote: Managed types apparently are not innocent. ;-) That is obviously for language developers. But to the language users thy seem to innocent ;-) -Michael -- Accelerate Dev

Re: [MSEide-MSEgui-talk] MSElang, long strings and dynamic arrays are not thread safe

2014-05-12 Thread Ivanko B
The overhead? Every operation which inc/dec's ref count, for example That's why me recommend both types - You may implement unsafe types first and safe ones later. -- Accelerate Dev Cycles with Automated Cross-Browser

[MSEide-MSEgui-talk] MSElang, long strings and dynamic arrays are not thread safe

2014-05-11 Thread Martin Schreiber
Hi, Because of the big overhead by locked refcount operations and memory barriers long strings and dynamic arrays are not thread safe, even reading needs serializing if the data will be accessed from several threads. Opinions? Martin

Re: [MSEide-MSEgui-talk] MSElang, long strings and dynamic arrays are not thread safe

2014-05-11 Thread Ivanko B
Opinions? Two options with distinguishable syntax. var1: int; threasafe var1: int; or var1: int threadsafe; -- Is your legacy SCM system holding you back? Join Perforce May 7 to find out: #149; 3

Re: [MSEide-MSEgui-talk] MSElang, long strings and dynamic arrays are not thread safe

2014-05-11 Thread Martin Schreiber
On Sunday 11 May 2014 10:30:13 Ivanko B wrote: Opinions? Two options with distinguishable syntax. var1: int; threasafe var1: int; or var1: int threadsafe; Have you ever concurrentely read strings from different threads? Martin

Re: [MSEide-MSEgui-talk] MSElang, long strings and dynamic arrays are not thread safe

2014-05-11 Thread Ivanko B
Have you ever concurrentely read strings from different threads? == With memory access hooks etc ? No, but there may be such need - it's even obvious from Your question. -- Is your legacy SCM system

Re: [MSEide-MSEgui-talk] MSElang, long strings and dynamic arrays are not thread safe

2014-05-11 Thread Ivanko B
I looks like DB issues about concurrent accessing shared data. There're a few 100% working access disciplines for that - SHARE, SHARE READ, SHARE EXCLUSIVE etc. For instance, they may introduce read waiting for another's change to commit. How about implemention those with thread-safe variables ?