From 709543dec3eaa07f7d2d7da2157d1f9159bad5d8 Mon Sep 17 00:00:00 2001 From: Pixel Date: Mon, 12 Nov 2001 16:11:04 +0000 Subject: Taskman --- lib/ReadJob.cc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'lib/ReadJob.cc') 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; } -- cgit v1.2.3