Thread locking issue
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
PySQLPool |
Fix Released
|
Critical
|
Nikoleta Verbeck |
Bug Description
Whe i use this method the program stuck and got a locked mysql connection
No stack trace show, have to manually kill the program and the mysql connection.
code:
import PySQLPool,datetime
class Connections(
__pool= None
__connectio
def __init_
self.__pool = PySQLPool.
def returnQuery(self):
query= PySQLPool.
return query
Changed in pysqlpool: | |
milestone: | none → 0.3.6 |
assignee: | nobody → Nick Verbeck (nerdynick) |
importance: | Undecided → Critical |
status: | New → In Progress |
Changed in pysqlpool: | |
status: | In Progress → Fix Released |
So the actual problem is the use of you Connections class(). PySQLPool manages all this for you. The only thing you may wish to keep track off to reduce code is the PySQLConnection object returned from PySQLPool. getNewConnectio n().
Each thread will want to call PySQLPool. getNewQuery( PySQLConnection *). As this is what allows the thread safe locking and opening of multiple connections to happen.
Sorry for this problem. I really need to get some documentation up.