This message was deleted.
# community-support
s
This message was deleted.
v
I don't think any in- output streams are thread-safe exact for special ones. And opening multiple output streams is probably also not a good idea. You probably have to have some demuxer that writes to the stream and that you use from the threads
šŸ‘ 1
Maybe you can connect mutliple
PipedOutputStreams
to one
PipedInputStream
and then have one thread the writes from that to the
JarOutputStream
, but I never tried that. Could as well not work properly. But you probably need some manual synchronization anyway so that the entries do not interleave.
g
Is writing it as a collection of files and than aggregation to Jar in another task a possibility in your case? If not using some good MPSC library implementation would be my approach. `PipedInputStream`/`PipedInputStream` connect one-on-one iirc, they are two sides of the pipe. Not to mention its internal threading and synchronization model.
šŸ‘ 1
e
Unfortunately, add an aggregation Task for creating the jar is a bit complex, since AGP pipelined all bytecode transform tasks, they are highly tightened. But I learned the workflow breakdown from you guys, I’m working on
BuildService
+
ConcurrentLinkedQueue
to gather transformed class file into one place and then write to the final Jar.
šŸ‘Œ 1