]> gerrit.simantics Code Review - simantics/platform.git/commitdiff
IndexedRelationsSearcherBase possible deadlock with semaphore 01/1601/1
authorjsimomaa <jani.simomaa@gmail.com>
Thu, 8 Mar 2018 07:56:08 +0000 (09:56 +0200)
committerTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Mon, 19 Mar 2018 20:51:57 +0000 (22:51 +0200)
refs #7805

Change-Id: I0a3e7d03b648d2b03b187baf171c0c95b4b7abb9
(cherry picked from commit 3826e289058a51d09310b7ba1251e959dc0ed3d0)

bundles/org.simantics.db.indexing/src/org/simantics/db/indexing/IndexedRelationsSearcherBase.java

index b303dfc4c4b1fc73f2b10eba9363cab20ddabfb0..cf22a0dbf17fa5feb1f5e0467ff9be07bcf759f3 100644 (file)
@@ -677,10 +677,10 @@ abstract public class IndexedRelationsSearcherBase {
                                 }
                             }
                         }
-
-                        s.release();
                     } catch (DatabaseException e) {
                         throw new IllegalStateException(e);
+                    } finally {
+                        s.release();
                     }
                 });
             }