]> git.corax.cc Git - toolbox/commit
include/queue: Add functions for file queues and duplicate-free queues
authorMatthias Kruk <m@m10k.eu>
Wed, 14 Apr 2021 23:52:21 +0000 (08:52 +0900)
committerMatthias Kruk <m@m10k.eu>
Wed, 14 Apr 2021 23:52:21 +0000 (08:52 +0900)
commit887bfe57b2f0e66626f727c2eb8f5a5925bab403
treeed81c86ab0438cca390d9cce783c54192eb0eed1
parent949c9aa7ad5f91a08be5609552f644675af077dd
include/queue: Add functions for file queues and duplicate-free queues

For certain automation tasks, it would be helpful if filesystem objects
could be passed through queues. This commit adds such functionality to
the queue module.

For passing files, these functions can be used:
 - queue_put_file()
 - queue_get_file()

For duplicate-free transient data:
 - queue_put_unique()
 - queue_get()

For other transient data:
 - queue_put()
 - queue_get()

There are two things worth noting:
 1. The queues are line-based (transient data may not contain newlines)
 2. Queues cannot be used for transient data and files at the same time
include/queue.sh