mirror of
https://github.com/brmlab/brmdoor_libnfc.git
synced 2025-06-07 08:04:06 +02:00
Comment about GIL while polling with NFC reader
This commit is contained in:
parent
84390a7958
commit
91360e7d3c
1 changed files with 2 additions and 0 deletions
|
@ -104,6 +104,8 @@ std::string NFCDevice::scanUID() throw(NFCError)
|
|||
throw NFCError("NFC device not opened");
|
||||
}
|
||||
|
||||
// We release GIL because otherwise it would block other threads. Since this polling is de-facto sleep and
|
||||
// doesn't touch any variables, it works as a language without GIL would.
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
res = nfc_initiator_poll_target(_nfcDevice, _modulations, _modulationsLen, pollNr, pollPeriod, &nt);
|
||||
Py_END_ALLOW_THREADS
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue