[Pcsclite-muscle] Difference from Windows' implementation with regard to PC/SC shared mode

Maksim Ivanov emaxx
Mon Oct 31 14:26:37 PDT 2016


Hello,


On Wed, Oct 26, 2016 at 6:29 PM, Ludovic Rousseau
<ludovic.rousseau at gmail.com> wrote:
> Maskim, can you try again on Windows but using 2 different hContext
> (SCardEstablishContext) in the 2 threads?

Sorry, I don't have a Windows device at hand. I'll try to find one and
see whether I can reproduce the issue.

I based my message on a report from one of our partners.

Though sorry for not mentioning explicitly that I didn't have a
reproducible test case.


2016-10-26 12:32 GMT+02:00 Michael Traut <michael.traut at gmail.com>:
> Afaik reusing the same context in different threads is considered bad practice
> (http://muscle.musclecard.narkive.com/ZAn5vTFD/multiple-threads-and-scardgetstatuschange)?

That's true. Though in the case described by me two different handles were used.


Regards,
Maksim


On Wed, Oct 26, 2016 at 6:29 PM, Ludovic Rousseau
<ludovic.rousseau at gmail.com> wrote:
>
>
>
> 2016-10-26 12:32 GMT+02:00 Michael Traut <michael.traut at gmail.com>:
>>
>> Hi,
>>
>> i can not unconditionally confirm this behavior under windows. At least when using different contexts, the second connect is blocked, even when it is shared. I have no example when the same context is used, this may differ.
>
>
> Interesting.
> I must admit I have not tested the windows behavior on this. Maybe I should have test it myself :-(
>
>>
>> Afaik reusing the same context in different threads is considered bad practice (http://muscle.musclecard.narkive.com/ZAn5vTFD/multiple-threads-and-scardgetstatuschange)?
>
>
> Exact. Using the same hContext in different threads may lead to dead locks.
>
> Maskim, can you try again on Windows but using 2 different hContext (SCardEstablishContext) in the 2 threads?
>
> Thanks
>
>
> --
>  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




More information about the pcsclite-muscle mailing list