`formatValue` (and `formattedWrite`), *should* work with a sink. The only limitation is that none of the passed `args` arguments are strings, or wide characters:
http://d.puremagic.com/issues/show_bug.cgi?id=10571

For wide chars, it is an obvious and stright up bug.

For strings, it's more complex. I'd need to double check, but there is a code branch for `raw write` (`"%r"`) of strings that makes formattedWrite iterate over the string as range of `dchars`, and you can't palce a dchar in a string sink. Since I have no idea what "raw" is actually supposed to do, I don't even know if its correct behavior or not to do it that way. My fix works around that problem, but I think a deeper review of what `formatValue` actually *does* would be needed.

If you *do* need to put a string into the sink, then chances are you don't actually need to format it, so a straight up "put" will workaround that problem.

Anywhoo, back to the subject. TL;DR; In your case,

`formattedWrite(sink, "Tid(%s)", threadID);`

Should 100% work no problem, and not allocate either (as far as the *write* is concerned of course, the sink itself can do anything it wants).