adrian.licuriceanu Posted July 18, 2019 Share Posted July 18, 2019 Hi, Am I right to assume that Unigine::Ptr operations are not thread safe (looks that way)? For example: Unigine::TexturePtr tex; thread 1: someFunctionCall(tex); do something with tex there. thread 2: tex = Unigine::TexturePtr(nullptr); or just assign another pointer. I think thread 1 can end up with incorrect tex pointer at one point (partially destroyed). So everytime I access a pointer I should lock / unlock around it? Kind Regards, Adrian Licu Link to comment
silent Posted July 18, 2019 Share Posted July 18, 2019 Hi Adrian, Yep, most of the functions are not thread-safe. Here is more details: https://developer.unigine.com/en/docs/2.8/code/fundamentals/thread_safety/ How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
adrian.licuriceanu Posted July 18, 2019 Author Share Posted July 18, 2019 Ok, thanks. Yes, I know that link. So I need to do my own guarding locks when dealing with pointers. Link to comment
Recommended Posts