It seems that the only way to close a connection is to drop the the async handle. This will indeed close it but it may take time as that process happens on a different thread and we can never know when the file handle on the database is released. This is a problem on Windows.
call provides a &mut Connection so calling close on that doesn't work since Rusqlite's close must consume the connection.
It would be great if there was an explicit close method on the async handle that consumes the handle along with the connection and returns only when the closing process is over.
It seems that the only way to close a connection is to drop the the async handle. This will indeed close it but it may take time as that process happens on a different thread and we can never know when the file handle on the database is released. This is a problem on Windows.
call
provides a&mut Connection
so callingclose
on that doesn't work since Rusqlite'sclose
must consume the connection.It would be great if there was an explicit
close
method on the async handle that consumes the handle along with the connection and returns only when the closing process is over.