A single, simple file and a lock seems all you need. You push by lock,append,unlock. You pop by lock,seek,read,truncate,unlock.
You don't say what types of values you want to store. But the worst case would be to write after each item (in a fixed-width format) the size of the previous item.
- tye
In reply to Re: Persistent stack implementation (a file)
by tye
in thread Persistent stack implementation
by jeteve
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |