From cc78db0520ff384892cbee69557a38c3a1b04613 Mon Sep 17 00:00:00 2001 From: Pixel Date: Sun, 8 Apr 2012 22:03:50 -0700 Subject: Redifining yielding for operations a bit, making further refinements. --- src/ZHandle.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/ZHandle.cc') diff --git a/src/ZHandle.cc b/src/ZHandle.cc index 7ab0133..3a14d7d 100644 --- a/src/ZHandle.cc +++ b/src/ZHandle.cc @@ -79,7 +79,7 @@ ssize_t Balau::ZStream::read(void * buf, size_t count) throw (GeneralException) if (r <= 0) return readTotal; } - Task::yield(nullptr); + Task::operationYield(); int r = inflate(&m_zin, Z_SYNC_FLUSH); size_t didRead = count - m_zin.avail_out; readTotal += didRead; @@ -108,7 +108,7 @@ ssize_t Balau::ZStream::write(const void * buf, size_t count) throw (GeneralExce m_zout.avail_out = BLOCK_SIZE; int r = deflate(&m_zout, Z_NO_FLUSH); EAssert(r == Z_OK, "deflate() didn't return Z_OK but %i", r); - Task::yield(nullptr); + Task::operationYield(); size_t compressed = BLOCK_SIZE - m_zout.avail_out; if (compressed) { size_t w = m_h->forceWrite(obuf, compressed); -- cgit v1.2.3