我有两个程序:第一个仅写入sqlite db,第二个仅读取.我可以确定永远不会有任何错误吗?或者如何避免它(在python中)?
解决方法:
是的,通常是安全的.
Multiple processes can have the same database open at the same time. Multiple processes can be doing a SELECT at the same time. But only one process can be making changes to the database at any moment in time, however.
由于只有一个进程正在编写,所以很好.
例外:如果您的.sqlite文件存储在网络驱动器(Windows或NFS)上,则可能会中断.
【说明】:本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:254677821)!