Hi!
Should/must/may a frontend call sane_read after sane_cancel?
Case I: sane_cancel was called in a signal handler or in
other thread. The
reader thread still keeps calling sane_read until it returns
an error or EOF.
That's clear for me.
Case II: The frontend has read a block of image data from a
backend and it is
writing the data to a file but a IO error occurs. The
frontend probably calls
sane_cancel. What will/must the frontend do next? Will it
call sane_read
until an error or EOF occurs?
This is important to my backend (pixma). It would be much
more complex if
frontends are not required to call sane_read after
sane_cancel because I have
to check whether sane_cancel was called synchronously or
asynchronously. If
it's called synchronously (case II), an outstanding scan
operation must be
completely canceled before sane_cancel returns. If it's
call asynchronously
(case I), the request must be postponed by setting a flag
for example. The
request will be carried out when we return to the reader
thread.
Regards
--
Wittawat Yamwong
Hannover, Germany
--
sane-devel mailing list: sane-devel lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/sane-d
evel
Unsubscribe: Send mail with subject "unsubscribe
your_password"
to sane-devel-request lists.alioth.debian.org
|