mysql-native v2.1.0

Steven Schveighoffer schveiguy at yahoo.com
Thu Mar 8 16:24:22 UTC 2018


On 3/8/18 11:14 AM, bauss wrote:
> On Thursday, 8 March 2018 at 15:09:07 UTC, Steven Schveighoffer wrote:
>> The point of a pool is to avoid some costly setup. In my case, I'm not 
>> even closing the connection because I feel the "cost" of allocating a 
>> connection from the heap isn't worth worrying about. But I also limit 
>> the pool so it's only going to allow X concurrent Db connections per 
>> thread.
>>
> 
> If you limit the amount of concurrent db connections will the task wait 
> until a connection can be acquired or will it throw an exception?

It uses a semaphore with a max count, so it would just pause the fiber.

https://github.com/vibe-d/vibe.d/blob/master/core/vibe/core/connectionpool.d#L55

-Steve


More information about the Digitalmars-d-announce mailing list