[Pcsclite-muscle] IFD polling
William Roberts
bill.c.roberts
Tue Feb 24 14:31:08 PST 2015
On Tue, Feb 24, 2015 at 2:01 PM, Ludovic Rousseau <
ludovic.rousseau at gmail.com> wrote:
> 2015-02-24 22:42 GMT+01:00 William Roberts <bill.c.roberts at gmail.com>:
> >
> >
> > On Tue, Feb 24, 2015 at 11:51 AM, Ludovic Rousseau
> > <ludovic.rousseau at gmail.com> wrote:
> >>
> >> 2015-02-24 19:13 GMT+01:00 William Roberts <bill.c.roberts at gmail.com>:
> >> > The worst part to me is the timeout. Which gets us back to polling
> >> > right?
> >>
> >> No.
> >> The timeout is 10 minutes in normal case or 5 seconds in case of auto
> >> power off [1] and then 10 minutes.
> >>
> >> You also need to support TAG_IFD_STOP_POLLING_THREAD so pcscd can stop
> >> your polling function either to switch to a 5 seconds timeout or to
> >> cleanly exit.
> >>
> >> > Ideally we would want an event based system for this. Perhaps provide
> a
> >> > function pointer to my ifd I can call to trigger this event.
> >>
> >> It _is_ event based. Just return from your polling/callback function
> >> on the event.
> >> You can whatever event based (or not) you want in your callback
> function.
> >
> >
> > There is still a timeout, so the thread that is blocking on my function
> > sleeps for
> > TIMEOUT, wakes up, and does what? Eventually some thread comed back
> around
> > and calls my fn again, and the process repeats. So doesn't that
> constitute
> > polling?
>
> You are right. But it is a very very low frequency polling :-)
>
> > While 10m is a long time, it should
> > just block indefinitley until some other thread calls stop().
>
> If executing some code every 10 minutes is too much CPU waste for you
> then you can block indefinitely. It should just work as you want.
>
>
Thanks, no 10 minutes is fine. Another question, has anyone made
a Java interface for this?
> Bye
>
> --
> Dr. Ludovic Rousseau
>
> _______________________________________________
> Pcsclite-muscle mailing list
> Pcsclite-muscle at lists.alioth.debian.org
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pcsclite-muscle
>
--
Respectfully,
William C Roberts
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pcsclite-muscle/attachments/20150224/d4cc6bf2/attachment.html>
More information about the pcsclite-muscle
mailing list