CUBLAS.jl icon indicating copy to clipboard operation
CUBLAS.jl copied to clipboard

use Defer instead of atexit

Open adambrewster opened this issue 7 years ago • 2 comments

I previously proposed not closing the cublas handle in an atexit handler (#19). This PR is for the same reasons but proposes an alternate mechanism to see the handle is closed if and when desired by the user. It also partially addressed #15.

adambrewster avatar Mar 18 '17 19:03 adambrewster

Defer.jl sounds definitively interesting. I am slightly wary of adding a new dependencies.

@kshyatt What do you think?

vchuravy avatar Mar 21 '17 05:03 vchuravy

That's a very reasonable objection, but Defer is pure julia and only about ~100 lines of code. The downside in this particular case is less than for some other packages that you might like to depend on.

adambrewster avatar Mar 21 '17 17:03 adambrewster