Skip to content

next_line yields Ready(None) instead of Pending causing tight polling issues when using it on a select! loop #7401

Answered by Darksonn
DiegoTavares asked this question in General
Discussion options

You must be logged in to vote

Tokio returns Ready(None) if the file is empty. Transferring data by actively appending to the file from another process isn't very well supported - Tokio assumes that when the file is empty, it stays empty. I suggest you use a pipe instead to transfer data between processes, as pipes are not considered empty when you reach the end.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by DiegoTavares
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants