MCPcopy Create free account
hub / github.com/Singular/Singular / try_read

Method try_read

kernel/oswrapper/vspace.h:1215–1220  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1213
1214template <typename T>
1215Result<T> SyncVar<T>::try_read() {
1216 _lock.lock();
1217 Result<T> result = _set ? Result<T>(_value) : Result<T>();
1218 _lock.unlock();
1219 return result;
1220}
1221
1222template <typename T>
1223bool SyncVar<T>::write(T value) {

Callers

nothing calls this directly

Calls 2

lockMethod · 0.45
unlockMethod · 0.45

Tested by

no test coverage detected