#cat #parallel #free #asynchronous #dead-lock

app pcat

A dead-lock free parallel cat implementation

3 releases

0.1.2 Aug 28, 2021
0.1.1 May 20, 2021
0.1.0 May 19, 2021

#563 in Concurrency

33 downloads per month

GPL-3.0 license

15KB

🐱 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!

No runtime deps