I can't find any info on how this works.
Why not? You have the source code. Look at it.
If there is no room in the buffer, the function blocks until there is room. On 1.0, the buffer size is 64 bytes. On 0023 and earlier, the buffer size was a bit smaller - 1 byte.