Hello Michael,
Thx for answer.
Of course, there is no thread in mysqldb
but there is import in function connect line 73 of __init__.py
and line 128 to 132 of connections.py in method __init__(self, *args,
**kwargs):
So when i use connect function in my thread, it blocks because it
encounters the import of the library.
I rework mysqldb files, i move import out of functions and my thread
program which use mysqldb works : no deadlock.
I tried to do the same with sqlalchemy library but it s too hard, i
failed. So i can only use mysqldb in my thread though i want to use
sqlalchemy which is better to manipulate db.
correction, it doesn't even say that. All it says regarding deadlocks is that
an import shouldn't spawn a thread. SQLAlchemy does not spawn any threads
(pretty sure MySQLdb doesn't, either).
On May 2, 2010, at 11:28 AM, Michael Bayer wrote:
Where do you see SQLAlchemy spawning any threads ? Its the responsibility of
the threaded application to make sure all imports occur before threads are
spawned. The documentation you refer to states as much.
On May 2, 2010, at 8:34 AM, christiandemo...@gmail.com wrote:
Hi again,
I understand all!
SqlAlchemy and MySQLdb don t respect this rule 16.2.9
http://docs.python.org/library/threading.html#threaded-imports
Why? :(
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to this group, send email to sqlalch...@googlegroups.com.
To unsubscribe from this group, send email to
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/sqlalchemy?hl=en.
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to this group, send email to sqlalch...@googlegroups.com.
To unsubscribe from this group, send email to
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/sqlalchemy?hl=en.
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to this group, send email to sqlalch...@googlegroups.com.
To unsubscribe from this group, send email to
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/sqlalchemy?hl=en.