JuliaInterop / ZMQ.jl

Julia interface to ZMQ
Other
137 stars 58 forks source link

Add moar tests and fix `isfreed()` #245

Closed JamesWrigley closed 2 months ago

JamesWrigley commented 2 months ago

I was going through our coverage and adding some tests for low hanging fruit, and I noticed that the definition of isfreed() might be wrong? I changed it in e5d75e9 to return whether the message handle is not in gc_protect; if I read the code correctly it will be held in the dict until ZMQ has finished with it and called gc_free_fn(), which will delete it from the dict.

codecov-commenter commented 2 months ago

:warning: Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 86.64%. Comparing base (1a3d67c) to head (1290ef4).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #245 +/- ## ========================================== + Coverage 83.10% 86.64% +3.54% ========================================== Files 9 9 Lines 367 367 ========================================== + Hits 305 318 +13 + Misses 62 49 -13 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

stevengj commented 2 months ago

Whoops, good catch! I'm surprised this hasn't caused crashes before now.