Skip to content
Advertisement

Python – appending to same file from multiple threads

I’m writing an app that appends lines to the same file from multiple threads.

I have a problem in which some lines are appended without a new line.

Any solution for this?

JavaScript

Advertisement

Answer

The solution is to write to the file in one thread only.

JavaScript
Advertisement