You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have developed an app, which executes a few heavy queries, which yield a lot of data so I decided to write the query results to multiple files concurrently.
I create a FileChannel for each separate query and write the results concurrently.
When I execute the code sequentially, everything works as expected (using ZIO.collectAll), but once I use ZIO.collectAllPar, content from one file can appear in the other.
The question is: even though I do not leak FileChannel anywhere, the content from one file can appear in there other (they will be mixed together as if a few streams use the same FileChannel), how can it be fixed?
Thanks for help in advance!
The text was updated successfully, but these errors were encountered:
I have developed an app, which executes a few heavy queries, which yield a lot of data so I decided to write the query results to multiple files concurrently.
I create a
FileChannel
for each separate query and write the results concurrently.When I execute the code sequentially, everything works as expected (using
ZIO.collectAll
), but once I useZIO.collectAllPar
, content from one file can appear in the other.The question is: even though I do not leak
FileChannel
anywhere, the content from one file can appear in there other (they will be mixed together as if a few streams use the sameFileChannel
), how can it be fixed?Thanks for help in advance!
The text was updated successfully, but these errors were encountered: