[flext] Threaded objects that aren't externals

Spencer Russell spencer.f.russell at gmail.com
Sun Nov 20 04:23:24 CET 2011


I've got an external where each instance of the external is sharing
access to a class (MantaManger) instance that's defined as static for
that class.

The static object is supposed to handle a few threads that my externals need.

what should the class of my static object inherit from? flext,
flext_obj, flext_base?

inheriting from flext gave errors when I tried to declare the threaded
method using the FLEXT_THREAD_X macro because my class didn't have a
"t_classid" member, which is defined in flext_obj.

inheriting from flext_obj complained that:
error: invalid static_cast from type ‘flext_base_multi*’ to type
‘MantaManager::thisType*’
in the FLEXT_THREAD_X macro because I didn't inherit from flext_base

The only way to get past this was to inherit from flext_base, but I
was under the impression
that that's only supposed to be for classes that actually represent
externals. Am I doing
something wrong?

Also, after having MantaManager inherit from flext_base I'm also
getting segfaults in the constructor in the
flext_obj_multi::HasAttributes() function.

Thoughts?


More information about the flext mailing list