Skip to content

Commit 99a3403

Browse files
committed
Remove extra synchronization
Signed-off-by: Ryan Nett <[email protected]>
1 parent 3df55b9 commit 99a3403

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ public void attachFunction(ConcreteFunction function) {
407407
*
408408
* @param outerScope the pointer scope to attach the functions to.
409409
*/
410-
synchronized List<NativeFunction> getNativeFunctions(PointerScope outerScope) {
410+
List<NativeFunction> getNativeFunctions(PointerScope outerScope) {
411411
try (Reference ref = ref();
412412
PointerScope scope = new PointerScope()) {
413413
TF_Status status = TF_Status.newStatus();
@@ -441,7 +441,7 @@ synchronized List<NativeFunction> getNativeFunctions(PointerScope outerScope) {
441441
* @return the found {@link ConcreteFunction}, or {@code null} if none were found with the correct
442442
* name
443443
*/
444-
public synchronized ConcreteFunction getFunction(String key) {
444+
public ConcreteFunction getFunction(String key) {
445445
try (Reference ref = ref();
446446
PointerScope scope = new PointerScope()) {
447447
List<NativeFunction> funcs = getNativeFunctions(scope);
@@ -461,7 +461,7 @@ public synchronized ConcreteFunction getFunction(String key) {
461461
*
462462
* @return all functions attached to this graph.
463463
*/
464-
public synchronized List<ConcreteFunction> getFunctions() {
464+
public List<ConcreteFunction> getFunctions() {
465465
try (Reference ref = ref();
466466
PointerScope scope = new PointerScope()) {
467467
List<NativeFunction> funcs = getNativeFunctions(scope);

0 commit comments

Comments
 (0)