The problem with this code is that if user sets the :single_threaded option to false when instantiating the database