I've been trying to write a pool of database connections based on a lockable queue (well, seq in this case) called POOL
. I want to have POOL
as a global variable and then use initConnectionPool
to instantiate it. I've tried to do so with the code below
var POOL: ConnectionPool
proc initConnectionPool*(initialPoolSize: static int) =
POOL = ConnectionPool(connections: @[])
initLock(POOL.lock)
However, this throws a compiler error:
‘pthread_mutex_t {aka union <anonymous>}’ has no member named ‘abi’
I am not quite sure what this is supposed to mean or what to do about this. How can I fix this issue?