phobos / tango / ares
Charles D Hixson
charleshixsn at earthlink.net
Sat Feb 10 19:59:17 PST 2007
> Kevin Bealer wrote:
>> Sean Kelly wrote:
>>> Kevin Bealer wrote:
> The doc says that each instance of Sprint should not be shared. Each
> thread can happily create it's own Sprint instance and use that. It's a
> nice solution when you're doing lots of fiddly formatting, or need to do
> some formatting for a logger, or whatnot. Once instantiated it doesn't
> hit the heap ... that's the only benefit. In fact, it's really just a
> thin wrapper around:
> # Formatter.sprint (char output, char format, ...)
> Another option for multi-threads is to synch on the Sprint object; but
> that's obviously somewhat less efficient.
Ouch. That's ambiguous syntax. Do you mean the programs
shouldn't share the buffer, or that the library should ensure
that sharing doesn't happen? Either way fits the statement.
I would have read it as meaning the first, but you seem to be
saying that it's the second.
> Not at all!
> Tango is in early Beta, and this is exactly what's needed to file off
> the rough edges. We may not implement *everything* that everyone
> suggests, but every bug-report and every little nit-pick is wholly
> welcomed; seriously :)
I'm not sure whether you were quoting the documentation, or
reporting your understanding. If you were quoting the
documentation, I think it needs editing.
P.S.: If I remember properly, in an earlier beta sharing the
buffers in one's program resulted in run-time errors (buffer
overwrites) that weren't detected...unless one wrote checks
for the error. This may have been a slightly different case,
More information about the Digitalmars-d-learn