Skip to content

Commit 6ac9a43

Browse files
committed
Remove extra synchronization
Signed-off-by: Ryan Nett <[email protected]>
1 parent 2247ea7 commit 6ac9a43

File tree

1 file changed

+3
-3
lines changed
  • tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow

1 file changed

+3
-3
lines changed

tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/Graph.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ public void attachFunction(ConcreteFunction function) {
404404
*
405405
* @param outerScope the pointer scope to attach the functions to.
406406
*/
407-
synchronized List<NativeFunction> getNativeFunctions(PointerScope outerScope) {
407+
List<NativeFunction> getNativeFunctions(PointerScope outerScope) {
408408
try (Reference ref = ref();
409409
PointerScope scope = new PointerScope()) {
410410
TF_Status status = TF_Status.newStatus();
@@ -438,7 +438,7 @@ synchronized List<NativeFunction> getNativeFunctions(PointerScope outerScope) {
438438
* @return the found {@link ConcreteFunction}, or {@code null} if none were found with the correct
439439
* name
440440
*/
441-
public synchronized ConcreteFunction getFunction(String key) {
441+
public ConcreteFunction getFunction(String key) {
442442
try (Reference ref = ref();
443443
PointerScope scope = new PointerScope()) {
444444
List<NativeFunction> funcs = getNativeFunctions(scope);
@@ -458,7 +458,7 @@ public synchronized ConcreteFunction getFunction(String key) {
458458
*
459459
* @return all functions attached to this graph.
460460
*/
461-
public synchronized List<ConcreteFunction> getFunctions() {
461+
public List<ConcreteFunction> getFunctions() {
462462
try (Reference ref = ref();
463463
PointerScope scope = new PointerScope()) {
464464
List<NativeFunction> funcs = getNativeFunctions(scope);

0 commit comments

Comments
 (0)