History

use tryLock in some cases where we don't want to block and pass already locked to the findParticleByID() in scripting interface

ZappoMan committed 12 years ago

Commit 289be041 parent 5b825ec3 files · +17 −10Browse files

Showing the changes to interface/src/ParticleTreeRenderer.cpp (1 of 3 files). Show all

Unified · Split

interface/src/ParticleTreeRenderer.cpp+5−4
@@ -32,10 +32,11 @@ void ParticleTreeRenderer::init() { · 31 unmodified lines
32 32
33void ParticleTreeRenderer::update() {33void ParticleTreeRenderer::update() {
34 if (_tree) {34 if (_tree) {
35 ParticleTree* tree = (ParticleTree*)_tree;35 ParticleTree* tree = static_cast<ParticleTree*>(_tree);
36 _tree->lockForWrite();36 if (tree->tryLockForWrite()) {
37 tree->update();37 tree->update();
38 _tree->unlock();38 tree->unlock();
39 }
39 }40 }
40}41}
41 42

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t