diff options
author | Benoit Lamarche <benoitlamarche@google.com> | 2014-10-03 16:37:16 +0200 |
---|---|---|
committer | Benoit Lamarche <benoitlamarche@google.com> | 2014-10-03 16:37:16 +0200 |
commit | a5179c13d0a922f43ee76b3b31aff85cac8330a1 (patch) | |
tree | 9d951f8b06c9c082d56035f937451dd9bf5ae72e /jack | |
parent | 943f32e7293a8d11140ea8448d247ff4076c8c0c (diff) | |
download | toolchain_jack-a5179c13d0a922f43ee76b3b31aff85cac8330a1.zip toolchain_jack-a5179c13d0a922f43ee76b3b31aff85cac8330a1.tar.gz toolchain_jack-a5179c13d0a922f43ee76b3b31aff85cac8330a1.tar.bz2 |
Synchronize JayceSingleTypeWriter conditionally
Change-Id: I7fdaa3519ccf358e25136c7f83c8e020a1e90870
Diffstat (limited to 'jack')
-rw-r--r-- | jack/src/com/android/jack/backend/jayce/JayceSingleTypeWriter.java | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/jack/src/com/android/jack/backend/jayce/JayceSingleTypeWriter.java b/jack/src/com/android/jack/backend/jayce/JayceSingleTypeWriter.java index ae9b496..10bc65e 100644 --- a/jack/src/com/android/jack/backend/jayce/JayceSingleTypeWriter.java +++ b/jack/src/com/android/jack/backend/jayce/JayceSingleTypeWriter.java @@ -39,6 +39,7 @@ import com.android.sched.vfs.Container; import com.android.sched.vfs.DirectFile; import com.android.sched.vfs.OutputVDir; import com.android.sched.vfs.OutputVFile; +import com.android.sched.vfs.SequentialOutputVDir; import com.android.sched.vfs.VPath; import java.io.BufferedOutputStream; @@ -55,7 +56,6 @@ import javax.annotation.Nonnull; @Constraint(need = {JackFormatIr.class}, no = {NonJackFormatIr.class}) @Produce(JackFormatProduct.class) @Support(JackFileOutput.class) -@Synchronized public class JayceSingleTypeWriter implements RunnableSchedulable<JDefinedClassOrInterface> { @Nonnull @@ -71,8 +71,13 @@ public class JayceSingleTypeWriter implements RunnableSchedulable<JDefinedClassO } } + @Synchronized + public boolean needsSynchronization() { + return (outputDir instanceof SequentialOutputVDir); + } + @Override - public synchronized void run(@Nonnull JDefinedClassOrInterface type) throws Exception { + public void run(@Nonnull JDefinedClassOrInterface type) throws Exception { VPath filePath = getFilePath(type); OutputVFile vFile = outputDir.createOutputVFile(filePath); |