Closed ghost closed 11 years ago
On Node v0.10.1, but can reproduce the issue on Node v0.8.22 also.
I think this is actually my fault; everything I'm reading says that an explicit uv_ref isn't necessary after uv_queue_work(uv_default_loop(), ...). Removing the uv_ref lines appears to fix the issue. I'm going to read more docs and test it some more to make sure nothing's leaking; and then I'll send a pull request.
Here's an explanation that says the uv_ref / uv_unref are not necessary when used with uv_queue_work(uv_default_loop(), ...): https://github.com/developmentseed/node-sqlite3/pull/76
However, here's a commit that uses uv_ref after uv_queue_work(uv_default_loop(), ...): https://github.com/kashif/node-geos/blob/master/src/cpp/geometry.hpp
@baudehlo - I'm obviously pretty new to this; do you know the right way off the top of your head? Thanks.
Merged; I think I got it. Leaving this here for documentation and so @baudehlo can review if he wants.
Sounds good to me - I'm all pretty new to it too. As long as it doesn't leak memory, I'm happy.
I'll update package.json and do a release when I get to work tomorrow.
Hi; just wanted to leave a note here. I'm seeing a random crash (maybe one in every five executions) of a program that's using flock via node-fs-ext:
I'm going to see if I can figure this out; obviously any ideas would be greatly appreciated.