> Well, when you clear your pool and other threads are running queries
you're the one responsible. :)
Of course. But exception could provide additional information about
what is going on and where do I need to look.

On 6 October 2015 at 19:46, Jiří Činčura <j...@cincura.net> wrote:
> On Tue, Oct 6, 2015, at 15:46, Геннадий Забула wrote:
>> I have a question about method implementation.
>> CleanConnectionsImpl
>> It cleans connections in pool.
>> But why _busy dictionary connections are disposed as well?
>> Isn't it a trouble maker for inappropriate ClearPools method users?
>>
>> We had run in a problem where currently running queries were failing
>> because another thread wrongly cleared all pools. It was quite
>> unexpected.
>
> Well, when you clear your pool and other threads are running queries
> you're the one responsible. :)
>
>> We fixed the issue in our code with the thread, but I think it should
>> throw InvalidOperationException if _busy dictionary is not empty,
>> because it means that there may be currently running queries.
>
> I don't have problem throwing exception, because for valid uses it
> changes nothing. But might be unexpected when somebody took advantage of
> that behavior.
>
> --
> Mgr. Jiří Činčura
> Independent IT Specialist
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Firebird-net-provider mailing list
> Firebird-net-provider@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/firebird-net-provider

------------------------------------------------------------------------------
_______________________________________________
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider

Reply via email to