News Score: Score the News, Sort the News, Rewrite the Headlines

Debugging a Golang Bug with Non-Blocking Reads | Scratch Data

One of the ways we stream data from databases to the end-user is with a named pipe. Specifically, we do this with DuckDB to stream JSON-formatted results directly to the user. In the process of building this, we discovered a bug in how Go handles reading data from pipes. The Original Code The original code for reading data looks like this. First we create a named pipe: $ mkfifo p.pipe And then we generate data and pass it to the pipe. Instead of DuckDB, I'll use a simpler example to write data: ...

Read more at scratchdata.com

© News Score  score the news, sort the news, rewrite the headlines