3
之间的LIFO结构
可能重复:
Clean way to get near-LIFO behavior from multiprocessing.Queue? (or even just *not* near-FIFO)共享两个Python程序
我想分享一个LIFO(Queue.LifoQueue())两个不同的Python程序之间的结构。
将充当作家,另一个为读者
现在它只是一个简单的应用程序共享的读/写速度。
读者应该对LIFO插入UNIX时间戳和阅读它的读者:
**#writer.py**
def getWriteTime():
os.system("date +%s")
# write to the LIFO structure
**#reader.py**
def getReadTime():
# read from the LIFO structure
# do calculations
是,如何共享两个Python程序之间的相同数据结构网络化,而不将其写入到磁盘上的问题吗?
我知道多处理库允许在进程间共享资源,但我并没有完全得到它如何对Python程序之间共享LIFO(队列)
预先感谢您