Last active
January 4, 2016 20:59
Dummy writer prevents a fifo from sending EOFs to all readers when the real writer exits.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
while True: | |
self.logger.info("[Re]starting to read %s" % self.input_file) | |
with open(self.input_file, "rb") as f: | |
f1 = open (fname, "w") # The dummy writer has to be opened after a reader, otherwise it would block | |
for line in f: | |
...do_stuff_with_line...(line) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment