Back Midas Rome Roody Rootana
  Midas DAQ System  Not logged in ELOG logo
Entry  10 Feb 2020, Konstantin Olchanski, Suggestion, switch midas to c++ threads? 
    Reply  11 Feb 2020, Stefan Ritt, Suggestion, switch midas to c++ threads? 
    Reply  11 Feb 2020, Berta Beltran, Suggestion, switch midas to c++ threads? 
Message ID: 1815     Entry time: 10 Feb 2020     Reply to this: 1817   1819
Author: Konstantin Olchanski 
Topic: Suggestion 
Subject: switch midas to c++ threads? 
Hi, Stefan & co - now that midas is c++11 and c++11 comes with a threads library, should we 
switch midas to use the c++11 threads instead of pthreads? (Of course on Linux c++11 
threads are a layer on top of pthreads, the best I know).

This should remove the dependency on pthreads.h and use a more native implementation of 
threads on MacOS and Windows. (again, the best I can tell).

Of course this depends on c++11 threads having all the functions we need. Specifically, "lock 
with timeout" is useful to deal with "gah! everything stopped! what do I do!", a problem 
bedeviling midas in the early days (and still happens today!). Current midas kills everything 
after 5 minutes of deadlock - then the user knows how to restart everything and the developer 
has core dumps to look at. (to see which program/thread holds the lock and would not give it 
up).

Any thoughts on this?

K.O.
ELOG V3.1.4-2e1708b5