From: Adriano d. S. F. <adr...@gm...> - 2011-03-28 14:56:29
|
On 28-03-2011 11:47, Alex Peshkoff wrote: > On 03/28/11 18:18, Adriano dos Santos Fernandes wrote: > >> The user should not call detach and another methods simultaneously, >> never. Why the heck they would do it? This is user application problem. > > Why not? > User has background thread which on the regular basis performs some > actions with database. When database is close, that thread must close. I > think this is not user application problem, but a problem of API, > suggested not taking into an account MT specifics. > >> Users are supposed to know basic how-to-work with pointers, otherwise >> they don't even can get a pointer to the object. If they want to crash >> the local system you can do nothing about it. > > Sometimes I can. With reference counted objects. At least I can help > them to not crash when it can be avoided. > Yes, you can. We can do everything, that don't mean it's the right choice. Support (which the cost of spoil an API) a user mistake about detaching an attachment and having concurrent threads calling functions on it and hiding or throwing another errors in destructors is sure a wrong choice. Adriano |