"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/common/classes/ImplementHelper.h" between
Firebird-3.0.2.32703-0.tar.bz2 and Firebird-3.0.4.33054-0.tar.bz2

About: Firebird is a relational database offering many ANSI SQL standard features.

ImplementHelper.h  (Firebird-3.0.2.32703-0.tar.bz2):ImplementHelper.h  (Firebird-3.0.4.33054-0.tar.bz2)
skipping to change at line 266 skipping to change at line 266
// when yvalve is starting fb_shutdown(). This causes almost unavoidable segfaul t. // when yvalve is starting fb_shutdown(). This causes almost unavoidable segfaul t.
// To avoid it this class is added - it detects spontaneous (not by PluginManage r) // To avoid it this class is added - it detects spontaneous (not by PluginManage r)
// module unload and notifies PluginManager about this said fact. // module unload and notifies PluginManager about this said fact.
class UnloadDetectorHelper FB_FINAL : class UnloadDetectorHelper FB_FINAL :
public VersionedIface<IPluginModuleImpl<UnloadDetectorHelper, CheckStatus Wrapper> > public VersionedIface<IPluginModuleImpl<UnloadDetectorHelper, CheckStatus Wrapper> >
{ {
public: public:
typedef void VoidNoParam(); typedef void VoidNoParam();
explicit UnloadDetectorHelper(MemoryPool&) explicit UnloadDetectorHelper(MemoryPool&)
: cleanup(NULL), flagOsUnload(false) : cleanup(NULL), thdDetach(NULL), flagOsUnload(false)
{ } { }
void registerMe() void registerMe()
{ {
PluginManagerInterfacePtr()->registerModule(this); PluginManagerInterfacePtr()->registerModule(this);
flagOsUnload = true; flagOsUnload = true;
} }
~UnloadDetectorHelper() ~UnloadDetectorHelper()
{ {
skipping to change at line 301 skipping to change at line 301
bool unloadStarted() bool unloadStarted()
{ {
return !flagOsUnload; return !flagOsUnload;
} }
void setCleanup(VoidNoParam* function) void setCleanup(VoidNoParam* function)
{ {
cleanup = function; cleanup = function;
} }
void setThreadDetach(VoidNoParam* function)
{
thdDetach = function;
}
void doClean() void doClean()
{ {
flagOsUnload = false; flagOsUnload = false;
if (cleanup) if (cleanup)
{ {
cleanup(); cleanup();
cleanup = NULL; cleanup = NULL;
} }
} }
void threadDetach()
{
if (thdDetach)
thdDetach();
}
private: private:
VoidNoParam* cleanup; VoidNoParam* cleanup;
VoidNoParam* thdDetach;
bool flagOsUnload; bool flagOsUnload;
}; };
typedef GlobalPtr<UnloadDetectorHelper, InstanceControl::PRIORITY_DETECT_UNLOAD> UnloadDetector; typedef GlobalPtr<UnloadDetectorHelper, InstanceControl::PRIORITY_DETECT_UNLOAD> UnloadDetector;
UnloadDetectorHelper* getUnloadDetector(); UnloadDetectorHelper* getUnloadDetector();
// Generic status checker // Generic status checker
inline void check(IStatus* status) inline void check(IStatus* status)
{ {
if (status->getState() & IStatus::STATE_ERRORS) if (status->getState() & IStatus::STATE_ERRORS)
 End of changes. 4 change blocks. 
1 lines changed or deleted 13 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)