[CONPY-104] Python connector doesn't support gevent. Created: 2020-08-12 Updated: 2020-08-13 |
|
| Status: | Open |
| Project: | MariaDB Connector/Python |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | New Feature | Priority: | Trivial |
| Reporter: | Himanshu Mishra | Assignee: | Georg Richter |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | Question | ||
| Environment: |
Any |
||
| Description |
|
Since python connector is wrapped over C apis, python sockets are not used, hence gevent monkeypatching isn't able to yeild to other co-routines. Wanted to confirm if this is by standard and co-operative concurrent programming in python will not be supported on mariadb connector, or do we have goals to use pure python sockets eventually. Concurrency can be achieved using threading, however it adds notorious overhead of context switching. |
| Comments |
| Comment by Georg Richter [ 2020-08-13 ] |
|
Hi Himanshu, thank you for the feature request (I reclassified it from bug to feature). MariaDB Connector/Python uses MariaDB Connector/C which supports IO plugins (currently there are plugins for socket, sharedmem and named pipe available), it shouldn't be a big deal to write another plugin which uses gevent sockets directly. /Georg |