diff options
author | David Robillard <d@drobilla.net> | 2008-11-22 08:00:59 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2008-11-22 08:00:59 +0000 |
commit | cda796269b903899edcbc479dbdc3c7dacb944c5 (patch) | |
tree | b64164e3d916127f5adefd6b8bb6379bd5ea41a8 /src/engine | |
parent | fc397802d408441ce354c5b0328adc93f617aca5 (diff) | |
download | ingen-cda796269b903899edcbc479dbdc3c7dacb944c5.tar.gz ingen-cda796269b903899edcbc479dbdc3c7dacb944c5.tar.bz2 ingen-cda796269b903899edcbc479dbdc3c7dacb944c5.zip |
Finer grained locking on RDF world lock when parsing: prevents deadlock on loading massive patches that fill the event queue.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@1765 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/engine')
-rw-r--r-- | src/engine/QueuedEventSource.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/engine/QueuedEventSource.cpp b/src/engine/QueuedEventSource.cpp index 69ab805a..e9817c4b 100644 --- a/src/engine/QueuedEventSource.cpp +++ b/src/engine/QueuedEventSource.cpp @@ -114,13 +114,9 @@ QueuedEventSource::process(PostProcessor& dest, ProcessContext& context) ++num_events_processed; } - if (_full_semaphore.has_waiter() && num_events_processed > 0) - _full_semaphore.post(); - - /*if (num_events_processed > 0) - dest.whip();*/ - //else - // cerr << "NO PROC: queued: " << unprepared_events() << ", stamped: " << !_stamped_queue.empty() << endl; + if (num_events_processed > 0) + while (_full_semaphore.has_waiter()) + _full_semaphore.post(); } |