Skip to content

Commit

Permalink
* Synchronize Loader.loadLibrary() to fix potential race condition…
Browse files Browse the repository at this point in the history
… (pull #246)
  • Loading branch information
louxiu authored and saudet committed Jul 28, 2018
1 parent a9ab4e9 commit 69d3921
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/org/bytedeco/javacpp/Loader.java
Original file line number Diff line number Diff line change
Expand Up @@ -1119,7 +1119,7 @@ public static URL[] findLibrary(Class cls, ClassProperties properties, String li
* (but {@code if (!isLoadLibraries) { return null; }})
* @throws UnsatisfiedLinkError on failure
*/
public static String loadLibrary(URL[] urls, String libnameversion, String ... preloaded) {
public synchronized static String loadLibrary(URL[] urls, String libnameversion, String ... preloaded) {
if (!isLoadLibraries()) {
return null;
}
Expand Down

0 comments on commit 69d3921

Please sign in to comment.