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
Files can be edited while Hanyuu is reading from them, causing an Invalid File error.
This can be fixed in one of two ways:
Locking files while streaming using fcntl.lockf(filename, fcntl.LOCK_EX)
Locking files before reading files into RAM (such as a dictionary somewhere containing the open file object like deque(_tmp_files)), again using fcntl.lockf(filename, fcntl.LOCK_EX)
Option 2 can be implemented without a lock, but it causes a race condition to appear if a file is written to just as/while hanyuu is reading
The text was updated successfully, but these errors were encountered:
Files can be edited while Hanyuu is reading from them, causing an
Invalid File
error.This can be fixed in one of two ways:
fcntl.lockf(filename, fcntl.LOCK_EX)
deque(_tmp_files)
), again usingfcntl.lockf(filename, fcntl.LOCK_EX)
Option 2 can be implemented without a lock, but it causes a race condition to appear if a file is written to just as/while hanyuu is reading
The text was updated successfully, but these errors were encountered: