README: document old behaviour and alternative for xargs -P and -0 - sfeed - RSS and Atom parser
(HTM) git clone git://git.codemadness.org/sfeed
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit 34b0cefd3e144744d65ad1d2ad8e73c8d185b1f0
(DIR) parent 7f27e5c39dcd64b4c7951e4ff8e31d98a3c12047
(HTM) Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Sun, 22 Dec 2024 14:11:05 +0100
README: document old behaviour and alternative for xargs -P and -0
Diffstat:
M README | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+), 0 deletions(-)
---
(DIR) diff --git a/README b/README
@@ -1182,6 +1182,36 @@ This changes the yank command to set the tmux buffer, instead of X11 xclip:
SFEED_YANKER="tmux set-buffer \`cat\`"
+Alternative for xargs -P and -0
+-------------------------------
+
+Most xargs implementations support the options -P and -0.
+GNU or *BSD has supported them for over 20+ years!
+
+These functions in sfeed_update can be overridden in sfeedrc, if you don't want
+to use xargs:
+
+ feed() {
+ # wait until ${maxjobs} are finished: will stall the queue if an item
+ # is slow, but it is portable.
+ [ ${signo} -ne 0 ] && return
+ [ $((curjobs % maxjobs)) -eq 0 ] && wait
+ [ ${signo} -ne 0 ] && return
+ curjobs=$((curjobs + 1))
+
+ _feed "$@" &
+ }
+
+ runfeeds() {
+ # job counter.
+ curjobs=0
+ # fetch feeds specified in config file.
+ feeds
+ # wait till all feeds are fetched (concurrently).
+ [ ${signo} -eq 0 ] && wait
+ }
+
+
Known terminal issues
---------------------