Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Persistent stack implementation

by jbert (Priest)
on Nov 09, 2007 at 18:38 UTC ( [id://649972]=note: print w/replies, xml ) Need Help??


in reply to Persistent stack implementation

I guess your persistency criterion rules out a unix fifo (mkfifo foo)?

Another option would perhaps be system V message queues (see perldoc -f msgsnd and IPC::MSg.

But people often think these suck.

Replies are listed 'Best First'.
Re^2: Persistent stack implementation (s/L/F/)
by tye (Sage) on Nov 09, 2007 at 20:19 UTC
    I guess your persistency criterion rules out a unix fifo (mkfifo foo)?

    That and the fact that FIFO is a pipe not a stack (FILO). :)

    Another option would perhaps be system V message queues

    Queues are usually FIFOs as well.

    I can almost hear it: "FILO?! D'Oh!" - tye        

      Very prescient.

      D'oh!

      In which case, you just need to reverse your puts and gets. I'm sure it will all work out all right in the end.

      More seriously, the suggestion of using a file (with locking and fixed length records) is a good one. That should be fairly straightforward.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://649972]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (3)
As of 2024-04-20 03:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found