Commits

Sergei Vavinov committed b35059d

removed unneeded synchronization

Comments (0)

Files changed (2)

src/main/java/ru/yandex/bolts/function/Function2.java

     public Function2<A, B, R> memoize() {
         return new Function2<A, B, R>() {
             private final Function<Tuple2<A, B>, R> f = asFunction().memoize();
-            public synchronized R apply(A a, B b) {
+            public R apply(A a, B b) {
                 return f.apply(Tuple2.tuple(a, b));
             }
         };

src/main/java/ru/yandex/bolts/function/Function3.java

     public Function3<A, B, C, R> memoize() {
         return new Function3<A, B, C, R>() {
             private final Function<Tuple3<A, B, C>, R> f = asFunction().memoize();
-            public synchronized R apply(A a, B b, C c) {
+            public R apply(A a, B b, C c) {
                 return f.apply(Tuple3.tuple(a, b, c));
             }
         };