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

Task #4820: Removed superfluous write semaphore

parent 1bfd15f7
Branches
Tags
No related merge requests found
...@@ -197,32 +197,18 @@ namespace LOFAR ...@@ -197,32 +197,18 @@ namespace LOFAR
} }
static Semaphore writeSemaphore(300);
void OutputThread::doWork() void OutputThread::doWork()
{ {
time_t prevlog = 0; time_t prevlog = 0;
for (SmartPtr<StreamableData> data; (data = itsReceiveQueue.remove()) != 0; itsFreeQueue.append(data.release())) { for (SmartPtr<StreamableData> data; (data = itsReceiveQueue.remove()) != 0; itsFreeQueue.append(data.release())) {
//NSTimer writeTimer("write data", false, false);
//writeTimer.start();
writeSemaphore.down();
try { try {
itsWriter->write(data); itsWriter->write(data);
checkForDroppedData(data); checkForDroppedData(data);
} catch (SystemCallException &ex) { } catch (SystemCallException &ex) {
LOG_WARN_STR(itsLogPrefix << "OutputThread caught non-fatal exception: " << ex.what()); LOG_WARN_STR(itsLogPrefix << "OutputThread caught non-fatal exception: " << ex.what());
} catch (...) {
writeSemaphore.up();
throw;
} }
writeSemaphore.up();
//writeTimer.stop();
time_t now = time(0L); time_t now = time(0L);
if (now > prevlog + 5) { if (now > prevlog + 5) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment