On 07/02/2019 16:03, George Bakhtadze wrote:
As an option, you can store all thread-specific data within a
thread-safe data structure (Map) instead of threadvars and free that
structure in unit's finalization.
Yes, but you can end up with a lot of data for dead threads, if an app
create many short lived threads.
07.02.2019, 15:17, "Martin Frb" <laza...@mfriebe.de>:
As for the question, why create an object, why not just "threadvar
indent". User code can create (within the same thread) more than one
instance of the logger.
This I something that can be used in testcase, where the testcase wants
to have a logger, but does not want to mix with the log of the tested
code (maybe capture that log).
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal