Re: Share array element between threads

2014-11-06 Thread Misu via Digitalmars-d-learn
On Thursday, 6 November 2014 at 13:04:18 UTC, Marc Schütz wrote: It's a bug: https://issues.dlang.org/show_bug.cgi?id=2043 As a workaround, you can nest the call in another lambda: foreach(acc; accounts) { (Account acc) { task(() { writeln(acc.id); }).executeInNewThr

Share array element between threads

2014-11-06 Thread Misu via Digitalmars-d-learn
Hi, when I execute this code I have 7 7 7 as result, I think I understand why. How can I execute a special task for one element ? import std.stdio; import std.parallelism; void main(string[] args) { class Account { public this(int id) { this.id = id; }

Re: Not able to compile that code

2014-10-31 Thread Misu via Digitalmars-d-learn
On Friday, 31 October 2014 at 14:59:11 UTC, Steven Schveighoffer wrote: Yes. Any time the compiler has a segmentation fault, it's a bug. Please file here and tag with "ice" https://issues.dlang.org/enter_bug.cgi Thanks -Steve Ok done. Thank you.

Not able to compile that code

2014-10-31 Thread Misu via Digitalmars-d-learn
Hi, Im trying to compile this code but I have a Segmentation Fault. http://dpaste.dzfl.pl/882618dc09f1 It's coming from the template. I'm probably doing something bad. Is this a bug ?

Re: What am I doing Wrong (OpenGL & SDL)

2014-07-04 Thread Misu via Digitalmars-d-learn
Can you try to add DerelictGL3.reload(); after SDL_GL_CreateContext ?