This method releases some event loop resources held by the Aerospike module and the Aerospike C client library, such as libuv handles and timers. If not released, these handles will prevent the Node.js event loop from shutting down, i.e. it will keep your application from terminating.
The Aerospike module keeps an internal counter of active Client
instances, i.e. instances which have not been close()
'd yet. If
a client is closed and the counter reaches zero, this method will be called
automatically, unless Client#close is called with
releaseEventLoop
set to false
. (The default is
true
.)
If an application needs to create multiple client instance, i.e. to connect to multiple, different clusters, the event loop resources will be managed automatically, as long as at least once client instance is active at any given time, until the application terminates.
If, however, there could be one or more intermittent time periods, during
which no client is active (i.e. the internal client counter reaches zero),
then the clients need to be closed with releaseEventLoop
set
to false
and the event loop needs to be released explicitly by
calling releaseEventLoop()
.
Release event loop resources held by the module, which could keep the Node.js event loop from shutting down properly.