diff options
Diffstat (limited to 'lib/ReadJob.cc')
-rw-r--r-- | lib/ReadJob.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/ReadJob.cc b/lib/ReadJob.cc index c2a4629..3bab150 100644 --- a/lib/ReadJob.cc +++ b/lib/ReadJob.cc @@ -18,17 +18,19 @@ int ReadJob::Do() { *s >> buff; } catch (IOAgain e) { - return TASK_ON_HOLD; + cerr << "Suspending ReadJob to wait for reading...\n"; + Suspend(); } - current = 0; + cerr << "Read some bytes...\n"; } try { *d << buff << endnl; } catch (IOAgain e) { - current = 1; - return TASK_ON_HOLD; + cerr << "Suspending ReadJob to wait for writing...\n"; + Suspend(); } + cerr << "Wrote some bytes...\n"; if (buff == "") return TASK_DONE; } |