On 08/06/14 15:15, Dimitry Sibiryakov wrote: > 06.08.2014 13:01, Alex Peshkoff wrote: >> If same interface is used in 2 threads return status will get mixed. > In this case mixed status will be the smallest problem. Do you have an > idea what will > happen if someone call ITransaction::commit() in one thread and simultaneously > ITransaction::rollback() in another? I don't.
Answer for fb3: One that reached attachment lock in engine will succeed, other - fail. With status inside ITransaction it's quite possible that both callers will get same error. > To ensure that nobody does such dangerous things, it is enough to > document that > AnyInterface::getStatus() return status of the last call - no matter which > thread it was > made from. > In common I see no point to care about such hypothetical things unless > someone come > with statement "I need to call these methods of the same object from > different threads in > parallel for this and that". > I know for sure that for example SAS does such things in 2.5. May be not simultaneous commit/rollback, but some operations in IAttachment - yes, they do. ------------------------------------------------------------------------------ Infragistics Professional Build stunning WinForms apps today! Reboot your WinForms applications with our WinForms controls. Build a bridge from your legacy apps to the future. http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel