<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Feb 24, 2015 at 2:01 PM, Ludovic Rousseau <span dir="ltr"><<a href="mailto:ludovic.rousseau@gmail.com" target="_blank">ludovic.rousseau@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">2015-02-24 22:42 GMT+01:00 William Roberts <<a href="mailto:bill.c.roberts@gmail.com">bill.c.roberts@gmail.com</a>>:<br>
><br>
><br>
> On Tue, Feb 24, 2015 at 11:51 AM, Ludovic Rousseau<br>
> <<a href="mailto:ludovic.rousseau@gmail.com">ludovic.rousseau@gmail.com</a>> wrote:<br>
>><br>
>> 2015-02-24 19:13 GMT+01:00 William Roberts <<a href="mailto:bill.c.roberts@gmail.com">bill.c.roberts@gmail.com</a>>:<br>
>> > The worst part to me is the timeout. Which gets us back to polling<br>
>> > right?<br>
>><br>
>> No.<br>
>> The timeout is 10 minutes in normal case or 5 seconds in case of auto<br>
>> power off [1] and then 10 minutes.<br>
>><br>
>> You also need to support TAG_IFD_STOP_POLLING_THREAD so pcscd can stop<br>
>> your polling function either to switch to a 5 seconds timeout or to<br>
>> cleanly exit.<br>
>><br>
>> > Ideally we would want an event based system for this. Perhaps provide a<br>
>> > function pointer to my ifd I can call to trigger this event.<br>
>><br>
>> It _is_ event based. Just return from your polling/callback function<br>
>> on the event.<br>
>> You can whatever event based (or not) you want in your callback function.<br>
><br>
><br>
> There is still a timeout, so the thread that is blocking on my function<br>
> sleeps for<br>
> TIMEOUT, wakes up, and does what? Eventually some thread comed back around<br>
> and calls my fn again, and the process repeats. So doesn't that constitute<br>
> polling?<br>
<br>
</span>You are right. But it is a very very low frequency polling :-)<br>
<span class=""><br>
> While 10m is a long time, it should<br>
> just block indefinitley until some other thread calls stop().<br>
<br>
</span>If executing some code every 10 minutes is too much CPU waste for you<br>
then you can block indefinitely. It should just work as you want.<br>
<br></blockquote><div><br></div><div>Thanks, no 10 minutes is fine. Another question, has anyone made</div><div>a Java interface for this?</div><div>Â </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Bye<br>
<div class="HOEnZb"><div class="h5"><br>
--<br>
 Dr. Ludovic Rousseau<br>
<br>
_______________________________________________<br>
Pcsclite-muscle mailing list<br>
<a href="mailto:Pcsclite-muscle@lists.alioth.debian.org">Pcsclite-muscle@lists.alioth.debian.org</a><br>
<a href="http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pcsclite-muscle" target="_blank">http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pcsclite-muscle</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">Respectfully,<br><br>William C Roberts<br><br></div>
</div></div>