gear icon indicating copy to clipboard operation
gear copied to clipboard

refactor(gtest): make gtest thread safe

Open clearloop opened this issue 1 year ago • 1 comments

the arch of gtest was forced to be synchronous since gear_lazy_pages should only be initialized for once ( if I'm not mistaken ), however since we have already checked the re-init problem at System::new, we actually can replace the lifetimes in the ExtManager related stuffs with smart pointers + locks to make gtest thread safe and more modular, for use case, see #4016

API Changes

since std::sync::RwLock will introduce error handling logic, so this PR uses parking_lot::RwLock instead so there's no api changes in the instance methods

  • lifetimes are removed

@gear-tech/dev

clearloop avatar Jun 24 '24 17:06 clearloop