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.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

SPFIFO-1.1.8-py3.5.egg (4.3 kB view hashes)

Uploaded Source

SPFIFO-1.1.8-py2.7.egg (4.3 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page