Writing game engine in C++, considering switching to D

ponce via Digitalmars-d digitalmars-d at puremagic.com
Fri Feb 20 05:44:03 PST 2015


On Friday, 20 February 2015 at 13:04:51 UTC, John Colvin wrote:
> On Friday, 20 February 2015 at 09:57:48 UTC, 
> francesco.cattoglio wrote:
>> (e.g: if the GC calls any OpenGL function, you get a "nice" 
>> crash since OpenGL is not multithread-aware by default).
>
> Really? I don't see this in my projects. The GC stops the 
> world, so there shouldn't be any races.

Not a race.
An OpenGL contect can only active in one thread at once. If the 
GC calls a destructor from a thread which doesn't have that 
context active, it will probably crash.


More information about the Digitalmars-d mailing list