diff options
author | Pixel <pixel@nobis-crew.org> | 2012-04-08 22:03:50 -0700 |
---|---|---|
committer | Pixel <pixel@nobis-crew.org> | 2012-04-08 22:03:50 -0700 |
commit | cc78db0520ff384892cbee69557a38c3a1b04613 (patch) | |
tree | 01a05027d0d93d0a1253db56ed506087cc24aedb /src/ZHandle.cc | |
parent | dbf734fcf0ade3d92df31e4f0a7c0a5bd2b5605f (diff) |
Redifining yielding for operations a bit, making further refinements.
Diffstat (limited to 'src/ZHandle.cc')
-rw-r--r-- | src/ZHandle.cc | 4 |
1 files changed, 2 insertions, 2 deletions
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); |