getbouncer / cardscan-ios

A library for scanning credit and debit cards
MIT License
207 stars 66 forks source link

Ocr main loop deadlock bug fix #183

Closed kingst closed 4 years ago

kingst commented 4 years ago

Previously by having some of our queue clean up logic live in the deinit function of our main loop, it got hard to reason about because objects and deinit in subtle ways (e.g., see the first commit of this PR to see the bug). This PR cleans up our backgrounding logic, simplifies our use of dispatch queues, and removes the logic we had on deinit previously.

This new backgrounding logic is much easier to reason about, so hopefully this one will stick.

jaimejiyepark commented 4 years ago

i cant seem to reproduce the bug. After I put the code in, do I let the app run? scan a card?

jaimejiyepark commented 4 years ago

lgtm