09.12.2015 12:49, Dimitry Sibiryakov wrote: > 08.12.2015 23:26, Vlad Khorsun wrote: >>> 1) allowSweepThread() set DBB_sweep_starting >> Then code attempts to start sweep thread. Which could fail. > > If start thread fail, clearSweepFlags() will be called, clearing both > flags.
You forget about not catched exceptions > May be you mean failed sweeper attach? Yes, this case will leave the flag > set till the > end of world. There could be many different reasons to fail in the future code at the not expected places. >>>> 2) allowSweepRun() set DBB_sweep_in_progress and clear DBB_sweep_starting >>>> 3) cleanSweepFlags() clear both. >>>> >>>> One question: what will be wrong if allowSweepRun() don't clear >>>> DBB_sweep_starting? >> It could disable auto-sweep in this process. > > How? The routine is called in TRA_sweep(). All exit paths from > TRA_sweep() (successful > and error ones) are calling clearSweepFlags(). See above. Regards, Vlad PS What is your goal asking this questions ? All reasons was already explained, even more... Are you want us to write not robust code just to make it more simple for your eye ? Something else ? We spent a lot of time for nothing in this thread (not only in this...). ------------------------------------------------------------------------------ Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel