-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Closed
Description
While working on VideoIO, I was unaware of disable_sigint, and created a macro which disables interrupts around sections of code:
macro atomic(code)
quote
Base.sigatomic_begin()
ret = ($code)
Base.sigatomic_end()
ret
end
endEven after discovering disable_sigint, I like this a little better, especially for single ccalls (or in the case of VideoIO, wrapped ccalls):
@atomic av_freep(c) # function which wraps ccall((:av_freep,libavutil),Void,(Ptr{Void},),ptr)Is there interest in having this in Base? If so, I'll submit a PR.
Cc: @stevengj
Metadata
Metadata
Assignees
Labels
No labels