| 104 | } |
| 105 | |
| 106 | void set(PollNeededCallback callback) FL_NOEXCEPT { |
| 107 | if (callback.callback == nullptr) { |
| 108 | clear(); |
| 109 | return; |
| 110 | } |
| 111 | Snapshot* snapshot = new Snapshot(callback); // ok bare allocation |
| 112 | retire(mSnapshot.exchange(snapshot, fl::memory_order_acq_rel)); |
| 113 | } |
| 114 | |
| 115 | void clear() FL_NOEXCEPT { |
| 116 | retire(mSnapshot.exchange(nullptr, fl::memory_order_acq_rel)); |
no test coverage detected