🎉 Celebrating 25 Years of GameDev.net! 🎉
Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!
Multithreading issue
Hi,
I've encountered a problem in asCMemoryMgr while using AngleScript in different threads.
In one thread I run asCScriptEngine::ExecuteString() while an other thread calls asCScriptEngine::GetTypeIDByDecl().
The latter thread sometimes causes a segmentation fault in asCMemoryMgr::FreeScriptNode(), because asCScriptEngine::ExecuteString() calls asCMemoryMgr::FreeUnusedMemory(). This leads to simultanous access to the scriptNodePool member.
I added a critical section in every asCMemoryMgr method that accesses scriptNodePool.
That seems to fix the problem.
If you'd like to have the changes i can mail them to you.
Regards,
Tim
Yes, please send the changes to me.
Multithreading is always difficult to test, so any help in this area is always welcome.
Regards,
Andreas
Multithreading is always difficult to test, so any help in this area is always welcome.
Regards,
Andreas
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement