09.12.2015 12:17, Vlad Khorsun wrote: > 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
Thread::start() don't throw anything but Firebird::Exception. >> 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. This code is in thread routine, you cannot expect it to be executed before returning from Thread::start(). > 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 ? InterlockedOr is exactly as robust as your code. Didn't you look at produced assembler? Yes, I want you to write simple code. Is it too hard? -- WBR, SD. ------------------------------------------------------------------------------ Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel