OpenBazaar/OpenBazaar — pull request #918 by gubatron (2014-11-04 02:20:34+00:00)
Title: Quick fix test for sqlite different thread issue. (Issue #654)

https://github.com/OpenBazaar/OpenBazaar/issues/654

Found this solution on a stackoverflow thread.
I'm not sure if it fixes the problem as I can't replicate it
myself.

If you are getting this issue, please test this pull request

git remote add gubatron https://github.com/gubatron/OpenBazaar
git fetch gubatron
git checkout experimental-fix-sqlite-different-thread-issue-654

run openbazaar and let me know if the issue persists, or if now
this is causing even weirder issues.

This is far from the ideal solution, but it might fix the problem.

The right solution might be (if we need db fetched objects on another
thread) having a DB-querying thread which is responsible for performing
all DB fetch operations and keeping the consumable outputs
in a temporary container (dict or queue) which is then consumed by
other threads.