Skip to content
Snippets Groups Projects
Commit 6d233f47 authored by Jan David Mol's avatar Jan David Mol
Browse files

Task #3696: Forward configurable timeout from BufferSettings to SharedStruct

parent 0fea11fe
No related branches found
No related tags found
No related merge requests found
...@@ -37,14 +37,14 @@ namespace LOFAR ...@@ -37,14 +37,14 @@ namespace LOFAR
{ {
} }
BufferSettings::BufferSettings(const struct StationID &station, bool attach) BufferSettings::BufferSettings(const struct StationID &station, bool attach, time_t timeout)
: :
version(currentVersion), version(currentVersion),
station(station) station(station)
{ {
if (attach) { if (attach) {
do { do {
SharedStruct<struct BufferSettings> shm(station.hash(), false); SharedStruct<struct BufferSettings> shm(station.hash(), false, timeout);
*this = shm.get(); *this = shm.get();
} while (!valid()); } while (!valid());
......
...@@ -69,7 +69,7 @@ namespace LOFAR ...@@ -69,7 +69,7 @@ namespace LOFAR
// if attach=true, read settings from shared memory, using the given stationID // if attach=true, read settings from shared memory, using the given stationID
// if attach=false, set sane default values // if attach=false, set sane default values
BufferSettings(const struct StationID &station, bool attach); BufferSettings(const struct StationID &station, bool attach, time_t timeout = 60);
// Shortcut to set nrSamples to represent `seconds' of buffer. // Shortcut to set nrSamples to represent `seconds' of buffer.
void setBufferSize(double seconds); void setBufferSize(double seconds);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment