SQLAlchemy and Twisted

前端 未结 1 669
抹茶落季
抹茶落季 2021-01-06 12:02

I\'v learned twisted for somewhile and would like to do some network communication and local db operation as well.BTW, MySQL DB adopted, non-blocking required and perferred.

相关标签:
1条回答
  • 2021-01-06 12:33

    SQLAlchemy presents a blocking interface to database access. You can use it with Twisted if you use it in a separate thread. It's frequent to use many threads with SQLAlchemy anyway, so there's nothing really special going when you try to use it with Twisted. It only seems strange because Twisted itself mostly offers APIs which you don't need threads for.

    0 讨论(0)
提交回复
热议问题