[mythtv] [patch] ThreadedFileWriter::DiskLoop
Jim Westfall
jwestfall at surrealistic.net
Wed Feb 9 01:01:05 UTC 2005
Attached patch stops 100% cpu usage on the backend when there is no data
coming from a recorder class.
jim
-------------- next part --------------
--- mythtv/libs/libmythtv/RingBuffer.cpp.orig 2005-02-07 21:46:02.297327128 -0800
+++ mythtv/libs/libmythtv/RingBuffer.cpp 2005-02-07 22:03:54.875270496 -0800
@@ -268,10 +268,11 @@
{
size = BufUsed();
- if ((!in_dtor) &&
+ if ((!size) ||
+ ((!in_dtor) &&
(!flush) &&
(((unsigned) size < tfw_min_write_size) &&
- ((unsigned) written >= tfw_min_write_size)))
+ ((unsigned) written >= tfw_min_write_size))))
{
usleep(500);
continue;
More information about the mythtv-dev
mailing list