Closed olshevskiy87 closed 7 years ago
Nice catch... It actually was supposed to break loop, no point in breaking select only... So, a bug :)
You saying it also made process hang completely? I think reason for this is still there, could be race between block on requestRefresh <- struct{}{}
and slit quit.
This refresh request should respect context to properly abort in case ctx is done. Step by step :)
You saying it also made process hang completely?
yep
if you pass something through the pipe, e.g.
echo something | ./slit
, cpu activity suddenly increases, because thebreak
without labelloop
in refreshIfEmpty() function breaksswitch
operator only and slit hangs. I assume, that ifconfig.isStdinRead()
is true, we don't need to wait the stdin data anymore and we can leave cycle withbreak loop
.