Better logic in the buffering thread loop
commit1657c9e53477c55201d005f3971ada7345d8df7b
authorNicolas Pennequin <nicolas@nicolas-laptop.(none)>
Fri, 19 Oct 2007 17:41:00 +0000 (19 19:41 +0200)
committerlearman <learman@a1c6a512-1295-4272-9138-f99709370657>
Thu, 25 Oct 2007 19:18:20 +0000 (25 19:18 +0000)
treed66712a9582a168c4ea69f580a41346eee26c867
parent341cbfc889cb389c2909ac0e4dfc5e985befe878
Better logic in the buffering thread loop

* Interrupt fill_buffer() if an event has been received.
* Only put the disk to sleep if fill_buffer() completed without being interrupted
* Check for wasted space and low data when a timeout event was received

These changes aim to give more priority to queue events. With bufclose being
a queue event, there were problems when a large amount of handles needed
to be closed: fill_buffer() would prevent the messages from being processed
quickly.
apps/buffering.c