08.12.2015 17:12, Jim Starkey wrote: > But I don't get the logic that saving 10 ns. is worth introducing a > bug.
Could you elaborate what bug you have on mind? > I suppose there are cases where you want to set a bit and don't > care whether it was already set are diminishingly small -- and > insignificant. IMHO, on contrary, it is quite common case when several threads want to perform an operation but only is allowed to. In this topic's example it is running a sweep process. When a thread want to run it, there can be two cases: a) it is the first thread wanting to b) someone else is already running it In first case, the thread atomically set the flag and proceed. In second case, the thread atomically set the flag and abort. Result in both cases is exactly the same: flag is set but only first thread works. What I'm missing? -- WBR, SD. ------------------------------------------------------------------------------ Go from Idea to Many App Stores Faster with Intel(R) XDK Give your users amazing mobile app experiences with Intel(R) XDK. Use one codebase in this all-in-one HTML5 development environment. Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs. http://pubads.g.doubleclick.net/gampad/clk?id=254741911&iu=/4140 Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel