Workaround for typeid access violation

Etienne via Digitalmars-d digitalmars-d at puremagic.com
Wed Jun 17 12:52:39 PDT 2015


On Wednesday, 17 June 2015 at 18:41:13 UTC, Laeeth Isharc wrote:
> On Wednesday, 17 June 2015 at 02:35:40 UTC, Etienne Cimon wrote:
>> On Tuesday, 16 June 2015 at 22:31:38 UTC, Etienne Cimon wrote:
>>> Yeah, I'm going to make a personal branch and develop a GC 
>>> thread-local, and ensure memory/vtbl is left intact during 
>>> collection/finalization, it's a good experiment and I believe 
>>> it will be a way to solve the issue in the near future. Of 
>>> course, no support for moving shared objects in a foreign 
>>> thread anymore.. like that was any useful in the first place 
>>> :P
>>
>> My libraries run fine on a TLS GC so far:
>>
>> https://github.com/etcimon/druntime/commit/7da3939637bd1642400dbed83e3b0ff2844386ac
>>
>> Only error was with a signal handler trying to allocate on the 
>> GC. I think it'll be worth it for me to use this from now on. 
>> There's no locking and possibly no stop the world.
>
> why 'possibly' ?

I hadn't tested it when I wrote that message. I committed the 
changes today and my tests were successful in a thread-local GC, 
however I'm still scanning the other thread contexts. The only 
limitation is that you can't move objects between threads, a 
pointer must remain in the thread that created it if the object 
is used in another thread.

https://github.com/etcimon/druntime/commit/78a2bca1356e0514c516e5261649ca0bf686b4cb


More information about the Digitalmars-d mailing list