RE: [Reflex] Thread safety

From: Jean-Francois Bastien <jfbastien_at_cae.com>
Date: Wed, 23 Jan 2008 10:16:45 -0500


> I am currently replacing the platform dependent hash map
> implementation with a generic one. The static member
> functions you refer to are moved to a new class (Catalog)
> that implements a singleton for now, and will be a
> per-process singleton and a per-thread "singleton" in the
> future to allow for per-thread types for a future _threaded_
> interpreter. The latter doesn't need thread safety support,
> only the per-process one does.

Do you mean that a dictionary will only be accessible from the process and thread in which it was registered?
Or that the singletons are per thread and per process and are synchronized together?
I think the former is a bad idea, I want one DLL to publish its types and I want to be able to dynamically attach a debugger that queries Reflex to look at the dictionary and the instantiated classes and interact with them.

> So: if you can wait for a few weeks then please check out the
> new reflex. And if you need multi-threading support before we
> do I'd be extremely pleased to see a patch for Reflex's new
> hash map adding thread safety :-)

I can wait, but we do have plans to use Reflex in the race condition scenario that I outlined. I've got a few other things to tackle with Reflex, when they're done I'll see if you've started work and if not I will. I'll provide feedback on your implementation, it's very important to me (I'm not the only one working on this, what I write isn't one man's opinion!).

JF Received on Wed Jan 23 2008 - 16:18:03 CET

This archive was generated by hypermail 2.2.0 : Wed Jan 23 2008 - 23:50:01 CET