Crates.io | pcat |
lib.rs | pcat |
version | 0.1.2 |
source | src |
created_at | 2021-05-19 12:08:35.653195 |
updated_at | 2021-08-28 12:47:54.386029 |
description | A dead-lock free parallel cat implementation |
homepage | |
repository | https://github.com/yvan-sraka/pcat |
max_upload_size | |
id | 399546 |
size | 39,700 |
pcat
pcat
is an alternative version of cat
that will not fail (to read inputs) when results of computation
are not available in the right order!
mkfifo A B
cat A B > output &
echo "bar" > B & # the requirement of `&` here should not be...
echo "foo" > A
So, glad to know that with tac
you can remove it:
mkfifo A B
pcat A B > output &
echo "bar" > B # \o/
echo "foo" > A
Of course, pcat
and cat
give the same final result:
foo
bar
This could be particularly useful when you want to prototype parallel code
that relies on concatenation at some point, using classic cat
would create IO
lock which is not funny... this project was made at origin for the
purpose of YeAST implementation!