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

Method write

kernel/oswrapper/vspace.h:1223–1235  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1221
1222template <typename T>
1223bool SyncVar<T>::write(T value) {
1224 _lock.lock();
1225 if (_set) {
1226 _lock.unlock();
1227 return false;
1228 }
1229 _set = true;
1230 _value = value;
1231 if (!_sem->_idle())
1232 _sem->post();
1233 _lock.unlock();
1234 return true;
1235}
1236
1237class Event {
1238private:

Callers 1

mainFunction · 0.45

Calls 4

_idleMethod · 0.80
lockMethod · 0.45
unlockMethod · 0.45
postMethod · 0.45

Tested by

no test coverage detected