Re: How you guys go about -BetterC Multithreading?

2017-11-27 Thread ParticlePeter via Digitalmars-d-learn
On Friday, 10 November 2017 at 11:55:57 UTC, Guillaume Piolat wrote: For now we do have some @nogc alternatives for mutex, condition variables, thread-pool, file reading, etc... (dplug:core package) for use with the runtime disabled - the middle ground that's way more usable than -betterC.

Re: How you guys go about -BetterC Multithreading?

2017-11-10 Thread Jacob Carlborg via Digitalmars-d-learn
On 2017-11-10 14:30, Petar Kirov [ZombineDev] wrote: static constructors Yeah, those won't work. I don't think that's really related to TLS, hence my confusion. -- /Jacob Carlborg

Re: How you guys go about -BetterC Multithreading?

2017-11-10 Thread Petar via Digitalmars-d-learn
On Thursday, 9 November 2017 at 19:42:55 UTC, Jacob Carlborg wrote: On 2017-11-09 17:52, Petar Kirov [ZombineDev] wrote: Thanks for reminding me, I keep forgetting that it should just work (minus initialization?). What do you mean "initialization"? static constructors

Re: How you guys go about -BetterC Multithreading?

2017-11-10 Thread Petar via Digitalmars-d-learn
On Friday, 10 November 2017 at 11:55:57 UTC, Guillaume Piolat wrote: On Thursday, 9 November 2017 at 16:00:36 UTC, Petar Kirov [ZombineDev] wrote: In short, the cost / benefit of going all the way version(D_BetterC) is incredibly poor for regular applications, as you end up a bit more

Re: How you guys go about -BetterC Multithreading?

2017-11-10 Thread Guillaume Piolat via Digitalmars-d-learn
On Thursday, 9 November 2017 at 16:00:36 UTC, Petar Kirov [ZombineDev] wrote: In short, the cost / benefit of going all the way version(D_BetterC) is incredibly poor for regular applications, as you end up a bit more limited than with modern C++ (> 11) for prototyping. For example, even

Re: How you guys go about -BetterC Multithreading?

2017-11-09 Thread rikki cattermole via Digitalmars-d-learn
On 09/11/2017 4:00 PM, Petar Kirov [ZombineDev] wrote: On Thursday, 9 November 2017 at 13:00:15 UTC, ParticlePeter wrote: On Thursday, 9 November 2017 at 12:19:00 UTC, Petar Kirov [ZombineDev] wrote: On Thursday, 9 November 2017 at 11:08:21 UTC, ParticlePeter wrote: Any experience reports or

Re: How you guys go about -BetterC Multithreading?

2017-11-09 Thread Jacob Carlborg via Digitalmars-d-learn
On 2017-11-09 17:52, Petar Kirov [ZombineDev] wrote: Thanks for reminding me, I keep forgetting that it should just work (minus initialization?). What do you mean "initialization"? Any type that can be used in C in TLS should work in D as well (except for macOS 32bit, if anyone cares). --

Re: How you guys go about -BetterC Multithreading?

2017-11-09 Thread Petar via Digitalmars-d-learn
On Thursday, 9 November 2017 at 16:08:20 UTC, Jacob Carlborg wrote: On 2017-11-09 13:19, Petar Kirov [ZombineDev] wrote: Though you need to be extra careful not to use thread-local storage I think TLS should work, it's the OS that handles TLS, not druntime. Thanks for reminding me, I keep

Re: How you guys go about -BetterC Multithreading?

2017-11-09 Thread Jacob Carlborg via Digitalmars-d-learn
On 2017-11-09 13:19, Petar Kirov [ZombineDev] wrote: Though you need to be extra careful not to use thread-local storage I think TLS should work, it's the OS that handles TLS, not druntime. -- /Jacob Carlborg

Re: How you guys go about -BetterC Multithreading?

2017-11-09 Thread Petar via Digitalmars-d-learn
On Thursday, 9 November 2017 at 13:00:15 UTC, ParticlePeter wrote: On Thursday, 9 November 2017 at 12:19:00 UTC, Petar Kirov [ZombineDev] wrote: On Thursday, 9 November 2017 at 11:08:21 UTC, ParticlePeter wrote: Any experience reports or general suggestions? I've used only D threads so far.

Re: How you guys go about -BetterC Multithreading?

2017-11-09 Thread ParticlePeter via Digitalmars-d-learn
On Thursday, 9 November 2017 at 12:19:00 UTC, Petar Kirov [ZombineDev] wrote: On Thursday, 9 November 2017 at 11:08:21 UTC, ParticlePeter wrote: Any experience reports or general suggestions? I've used only D threads so far. It would be far easier if you use druntime + @nogc and/or

Re: How you guys go about -BetterC Multithreading?

2017-11-09 Thread ParticlePeter via Digitalmars-d-learn
On Thursday, 9 November 2017 at 12:43:54 UTC, Petar Kirov [ZombineDev] wrote: On Thursday, 9 November 2017 at 12:30:49 UTC, rikki cattermole wrote: On 09/11/2017 12:19 PM, Petar Kirov [ZombineDev] wrote: On Thursday, 9 November 2017 at 11:08:21 UTC, ParticlePeter wrote: Any experience reports

Re: How you guys go about -BetterC Multithreading?

2017-11-09 Thread Petar via Digitalmars-d-learn
On Thursday, 9 November 2017 at 12:30:49 UTC, rikki cattermole wrote: On 09/11/2017 12:19 PM, Petar Kirov [ZombineDev] wrote: On Thursday, 9 November 2017 at 11:08:21 UTC, ParticlePeter wrote: Any experience reports or general suggestions? I've used only D threads so far. It would be far

Re: How you guys go about -BetterC Multithreading?

2017-11-09 Thread rikki cattermole via Digitalmars-d-learn
On 09/11/2017 12:19 PM, Petar Kirov [ZombineDev] wrote: On Thursday, 9 November 2017 at 11:08:21 UTC, ParticlePeter wrote: Any experience reports or general suggestions? I've used only D threads so far. It would be far easier if you use druntime + @nogc and/or de-register latency-sensitive

Re: How you guys go about -BetterC Multithreading?

2017-11-09 Thread Petar via Digitalmars-d-learn
On Thursday, 9 November 2017 at 11:08:21 UTC, ParticlePeter wrote: Any experience reports or general suggestions? I've used only D threads so far. It would be far easier if you use druntime + @nogc and/or de-register latency-sensitive threads from druntime [1], so they're not interrupted