I'm having some weird problems with threading on shutdown.  As I previously
discovered, using neo4j in a multi-threaded Python app requires complete
segregation of neo4j into a single thread.  That all works fine for
creating a database, however, it appears that shutting one down is a bit of
a mystery.  I wrote a test program to minimally illustrate the difficulty:

http://pastebin.com/gg204kae

Threading is always easy to get wrong, so I added a simple switch to remove
neo4j from the picture.  When I disable neo, the program starts up and
shuts down cleanly.  When I re-enable neo, some of the print statements
never get run, and the app mysteriously exits.

I am testing this by saving it into a script and running it on the command
line.  Any time after the worker thread finishes creating the neo db, I hit
ctrl-c, and the two scenarios play out as above.

It seems that the embedded Python API is not exactly at the forefront of
popular use, and so I understand if nobody knows what's up with this.  I
just thought I should add something, for the record.  I hope my script
doesn't have an obvious bug.

Thanks,
Michael
_______________________________________________
Neo4j mailing list
[email protected]
https://lists.neo4j.org/mailman/listinfo/user

Reply via email to