Skip to main content

FIFO share for multiprocess

Project description

FFIFO share for multiprocess

Example

#!/usr/bin/env python
#!/usr/bin/env python
import PArray as pa 
from  spfifo import *
def test():
    pf1 = SPFIFO()
    pf1.init(key = "test", number_element = 5, dtype='|S5',  element_perblock=2, reNewFlag = True, timeout = 0, raseOtherDelete = False)
    pf2 = SPFIFO()
    pf2.init(key = "test")
    pf1.push(["aa123456"]);
    pf1.push(["bb",""]);
    pf1.push(["cc",""]);
    pf1.push(["dd",""]);
    pf1.push(["ee",""]);
    
    
    print("count ", pf2.count(), pf2.pop()[0])
    print("count ", pf2.count(), pf2.pop())
    print("count ", pf2.count(), pf2.pop())
    print("count ", pf2.count(), pf2.pop())
    print("count ", pf2.count(), pf2.pop())  

test()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for SPFIFO, version 1.2.0
Filename, size File type Python version Upload date Hashes
Filename, size SPFIFO-1.2.0-py2.7.egg (4.3 kB) File type Egg Python version 2.7 Upload date Hashes View
Filename, size SPFIFO-1.2.0-py3.5.egg (4.3 kB) File type Egg Python version 3.5 Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page