File tree Expand file tree Collapse file tree
java/src/main/java/org/rocksdb Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -84,12 +84,14 @@ public static void loadLibrary() {
8484 return ;
8585 }
8686
87- while (libraryLoaded .get () == LibraryState .LOADING ) {
88- try {
89- Thread .sleep (10 );
90- } catch (final InterruptedException e ) {
91- //ignore
87+ try {
88+ while (libraryLoaded .get () == LibraryState .LOADING ) {
89+ Thread .sleep (10 );
9290 }
91+ } catch (final InterruptedException e ) {
92+ // restore interrupted status
93+ Thread .currentThread ().interrupt ();
94+ throw new RuntimeException ("Interrupted whilst trying to load the RocksDB shared library" , e );
9395 }
9496 }
9597
@@ -146,12 +148,14 @@ public static void loadLibrary(final List<String> paths) {
146148 return ;
147149 }
148150
149- while (libraryLoaded .get () == LibraryState .LOADING ) {
150- try {
151- Thread .sleep (10 );
152- } catch (final InterruptedException e ) {
153- //ignore
151+ try {
152+ while (libraryLoaded .get () == LibraryState .LOADING ) {
153+ Thread .sleep (10 );
154154 }
155+ } catch (final InterruptedException e ) {
156+ // restore interrupted status
157+ Thread .currentThread ().interrupt ();
158+ throw new RuntimeException ("Interrupted whilst trying to load the RocksDB shared library" , e );
155159 }
156160 }
157161
You can’t perform that action at this time.
0 commit comments