astrand- sorry if you get this twice...
On Mon, 30 Oct 2006 astrand cendio.se wrote:
>
> I've realized that backends might not provide neither a
file descriptor
> for select() nor non-blocking mode. Why is this
allowed? I guess this
> means that applications, such as xsane, must use a
separate thread or
> process to read the data? IMHO, this puts a lot of
unnecessary burden on
> the application programmer. How common is it with
backends with neither a
> select FD nor non-blocking mode? How about adjusting
the standard so that
> backends must at least support one of these?
>
my personal opinion only:
there are plenty of front-ends for which non-blocking mode
is not required
(think command line, or cgi script, etc). all of my
front-ends work this
way. if each backend (there are 68+ of them) has both a
blocking and a
non-blocking mode, that is quite a bit of code. it is also
significantly
more difficult to debug the backend when it is
multi-threaded. given that
many of our backends are rarely touched or are maintained by
someone other
than the original author, it makes sense to keep them
simple.
besides, its easier for app developer (who likely has
multi-threading in
his app already for other purposes) to decide that he needs
it, and deal
with the threading himself.
the fujitsu backend no longer has threading for this reason.
allan
--
"so don't tell us it can't be done, putting down what
you don't know.
money isn't our god, integrity will free our souls" -
Max Cavalera
--
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
|