-
I've started playing with Acebase and when I run the following code it works as expected but waits for a 1 minute or so timeout before exiting Node. If I don't call Maybe it is waiting for me to close the db however I can't find any db close function!
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
It's because of the caching of record file address locations which are cleared 1 minute after they are last used. It uses setTimeout to schedule cleanups until cache is empty. After the last setTimeout fired, node's event queue is empty and will exit. |
Beta Was this translation helpful? Give feedback.
-
I added timeout.unref() so it will not prevent the process from exiting when the event loop is empty. I tested thoroughly and found no negative side-effects. Published with v1.2.0 |
Beta Was this translation helpful? Give feedback.
I added timeout.unref() so it will not prevent the process from exiting when the event loop is empty. I tested thoroughly and found no negative side-effects. Published with v1.2.0