Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
os.plock从 Python 应用程序中使用是否有任何实际用途?
os.plock
我真的无法想象它可以用来做什么,甚至不谈论现实世界的用例......
您通常使用进程或内存锁定的目的是避免操作系统交换到磁盘。在内存锁的情况下,这可能是用于加密目的的数据,不应写入(即使是暂时的)更永久的存储形式。在大型进程的情况下,这还可能包括进程堆栈或其他应该只保留在内存中的“段”。