バッファ出力とは何か?
バッファ出力とは、書き込まれたバイトをメモリ上の buffer に蓄積し、1 バイトずつではなくまとめて宛先へ送る手法です。少ない回数の大きな書き込みはより効率的ですが、buffer がフラッシュされるまでデータは見えません。フラッシュ前にクラッシュすると、buffer に溜まった内容が失われることがあります。
なぜ重要か
バッファリングがあるために、クラッシュした CI ステップは実際の失敗地点の手前で途切れた切り詰められたログを表示することがあります。フラッシュを強制するかバッファリングを無効にすると、デバッグ用にログ出力がリアルタイムで現れます。
関連ガイド
What Is Line Buffering?Line buffering flushes output each time a newline is written, so complete lines appear promptly while still b…
What Is a Pseudo Terminal?A pseudo terminal is a software pair that emulates a hardware terminal, letting programs that expect a termin…
What Is Blocking IO?Blocking IO pauses the calling thread until an input or output operation finishes, so the thread cannot do ot…