Tommaso Cucinotta <tomm...@lyx.org> writes: | Il 07/11/2011 10:55, Lars Gullik Bjønnes ha scritto: >> Tommaso Cucinotta<tomm...@lyx.org> writes: >> >> | +#include<QThread> >> | +#include<QThreadPool> >> | +#include<QMutex> >> | +#include<QMutexLocker> >> | +#include<QWaitCondition> >> >> Oh. how I dislike the Qt-fication of lyx... > | I know, but as Qt is a strong dependency, it is anyway ok to rely on | its portable | extra features, right ? For example, if we used directly pthreads, | would it compile | on Windows ?
Why would the alternative be pthreads? The alternative should ideally be standard C++, are at least something that behaves almost like the standard: boost::thread. >> For debugging ok... for a permanent solution make LYXERR do the locking. > | it will likely "hurt" the performance of logging from the | single-threaded parts of LyX (e.g., everywhere else, so far). Why do you think that? Modern mutex implementations only have to check one userspace address to check for contention. Basically you only get any significant overhead if the lock in question is contended.