diff options
author | David Robillard <d@drobilla.net> | 2006-09-09 14:24:56 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2006-09-09 14:24:56 +0000 |
commit | fca95e5d454d37bd74b98f5bce35cfcbaee86c3f (patch) | |
tree | 97fcf6e8afaf4356d46a24236e9aa2451ab55698 /src/libs/client/ThreadedSigClientInterface.cpp | |
parent | b853b3dde1f7028dd275f78433a6ad9b5b9f61c7 (diff) | |
download | ingen-fca95e5d454d37bd74b98f5bce35cfcbaee86c3f.tar.gz ingen-fca95e5d454d37bd74b98f5bce35cfcbaee86c3f.tar.bz2 ingen-fca95e5d454d37bd74b98f5bce35cfcbaee86c3f.zip |
Drove 'er home! Working monolothic Ingenuity (ie. in-process engine).
Countless bugfixes.
git-svn-id: http://svn.drobilla.net/lad/ingen@123 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/client/ThreadedSigClientInterface.cpp')
-rw-r--r-- | src/libs/client/ThreadedSigClientInterface.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libs/client/ThreadedSigClientInterface.cpp b/src/libs/client/ThreadedSigClientInterface.cpp index dd4503e7..28719598 100644 --- a/src/libs/client/ThreadedSigClientInterface.cpp +++ b/src/libs/client/ThreadedSigClientInterface.cpp @@ -33,6 +33,7 @@ ThreadedSigClientInterface::push_sig(Closure ev) // (Very) slow busy-wait if the queue is full // FIXME: Make this wait on a signal from process_sigs iff this happens while (!success) { + //printf("push %zu\n", _sigs.fill()); success = _sigs.push(ev); if (!success) { if (first) { @@ -55,8 +56,10 @@ ThreadedSigClientInterface::emit_signals() { // Process a maximum of queue-size events, to prevent locking the GTK // thread indefinitely while processing continually arriving events + const size_t limit = _sigs.capacity(); size_t num_processed = 0; - while (!_sigs.is_empty() && num_processed++ < _sigs.capacity()/2) { + while (!_sigs.is_empty() && num_processed++ < limit) { + //printf("emit %zu\n", _sigs.fill()); Closure& ev = _sigs.pop(); ev(); ev.disconnect(); |