Thread safety?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Thread safety?

Jörn Heissler
Hello,

I've got multiple card readers.
Are the pcsc-lite and pyscard libs thread safe in a sense that I can
assign one thread per reader and use multiple readers in parallel from a
single python process that way?

Cheers
Jörn

_______________________________________________
Pcsclite-muscle mailing list
[hidden email]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pcsclite-muscle
Reply | Threaded
Open this post in threaded view
|

Re: Thread safety?

Ludovic Rousseau
2016-09-13 19:44 GMT+02:00 Jörn Heissler <[hidden email]>:
Hello,

Hello,
 
I've got multiple card readers.

How many card readers?
 
Are the pcsc-lite and pyscard libs thread safe in a sense that I can
assign one thread per reader and use multiple readers in parallel from a
single python process that way?

pcsc-lite and the CCID driver are (should be) thread safe.

But because of Python global interpreter lock [1] I am not sure you can have 2 APDU exchanges on 2 readers at the same time.
Just try and tell us what you find.

Bye

--
 Dr. Ludovic Rousseau

_______________________________________________
Pcsclite-muscle mailing list
[hidden email]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pcsclite-muscle