LuaBridge icon indicating copy to clipboard operation
LuaBridge copied to clipboard

Some troubles with threading access

Open dmikoss opened this issue 12 years ago • 0 comments

You use this structure with global access:

 Source/LuaBridge/RefCountedPtr.h     

inline RefCountsType& getRefCounts ()    
   {    
    static RefCountsType refcounts;    
    return refcounts ;    
  }    

When i have few lua states with few smart pointers then i have potential threading error.

Solution - rework RefCountedPtr (remove hash map) or use sync primitives(not recommended)

dmikoss avatar Nov 19 '13 05:11 dmikoss