Closed infrom-software closed 6 years ago
you mean like this? https://github.com/lvsti/CEF.swift/pull/25
More like atomic_ref_count.h from Chromium or cef_atomicops_x86_gcc.h from CEF/Linux since cef_atomicops_mac.h deprecated (in 10.13 at least).
what difference would that make compared to the OS-provided locking mechanisms?
... or
add_ref, release and has_one_ref from cef_base_ref_counted_t to be implemented directly in C using
if you refer to the refcounting in CEFMarshaller
then I'm afraid it has to be locking since it's not just about testing and changing a number but also setting/releasing the reference to self
. But if you have a solution, feel free to submit a PR.
You're right. I didn't realise that.
While pthread works, using atomics would be better.(not an issue but a todo)