Can -starting the next release- the same hContext be used in many threads in pcsclite? (as in windows)
On Tue, Jun 26, 2012 at 4:23 PM, Ludovic Rousseau <[email protected]> wrote: > 2012/6/25 Aleksey Samsonov <[email protected]>: >> 2012/6/21 Ludovic Rousseau <[email protected]>: >>> 2012/6/21 Aleksey Samsonov <[email protected]>: >>>> 2012/6/18 Ludovic Rousseau <[email protected]>: >>>>> As documented at [1]: >>>>> " SCardEstablishContext() >>>>> Each thread of an application shall use its own SCARDCONTEXT. >>>>> SCardCancel() is the only exception to the rule. On Windows the same >>>>> SCARDCONTEXT can be shared by different threads of same application. " >>>>> Windows may have a different behavior. >>>> >>>> Absolutely right, I neglected and I used shared SCARDCONTEXT in >>>> different threads of process. Ok, it's a feature of PCSC-Lite. But may >>>> be apply patch to improve it (for more compatible with Windows)? >>> >>> I have not really looked at your patch. >> >> Could you please review it? Patch is small and very simple. > > SCardTransmit fixed in revision 6358 > SCardStatus fixed in revision 6359 > SCardBeginTransaction fixed in revision 6360 > SCardReconnect fixed in revision 6361 > >>> I do not want to spend time playing with mutexes. The risk to break >>> something else is too high. >> >> Use of the mutex is absolutely correct in the patch, it's correspond >> standarts and don't have any hack. Patch isn't affected previous >> version API and client code isn't need modify. > > You are right. The patch is simple and easy to understand. > > I also removed the need to create a SCARDCONTEXT per thread (revision 6362). > > Thanks for pushing your patch :-) > > Bye > > -- > Dr. Ludovic Rousseau > > _______________________________________________ > Muscle mailing list > [email protected] > http://lists.drizzle.com/mailman/listinfo/muscle _______________________________________________ Muscle mailing list [email protected] http://lists.drizzle.com/mailman/listinfo/muscle
