RE: [Reflex] Thread safety

From: Jean-Francois Bastien <jfbastien_at_cae.com>
Date: Thu, 24 Jan 2008 09:04:44 -0500


> Later access of the registered types is thread safe, though,
> because the containers are only being read.

I'm correcting myself here: invoking methods which have a return value isn't thread safe since the generated code looks something like:

static void* method_20845( void* o, const std::vector<void*>&, void*) {
  static SomeReturnType ret;
  ret = ((const ::MyNamespace::MyClass*)o)->SomeMethod();   return &ret;
}

That static function variable can be overwritten by multiple threads.

JF Received on Thu Jan 24 2008 - 15:05:07 CET

This archive was generated by hypermail 2.2.0 : Thu Jan 24 2008 - 17:50:01 CET