Thread and LogStream

Please post support and help requests here.
Posts: 26
Joined: 24 Sep 2007, 17:48

Thread and LogStream

Postby cx500tc » 19 Jun 2008, 17:41


Given a Poco::LogStream binded to a Poco::Logger, and Poco::Logger is made up of a splitter channel which itself has a bunch of channels, what is going to happens if in a multi thread environnment during a << option to the LogStream, the splitter channel is modified? Is this safe?

Posts: 1216
Joined: 11 Jul 2006, 16:27
Location: Austria

Re: Thread and LogStream

Postby guenter » 19 Jun 2008, 22:01

This is save, as all SplitterChannel methods are guarded by a mutex.
Note that LogStream uses an internal buffer, and only if you write a newline to the LogStream, the contents of the buffer are passed on to the underlying Logger.

Return to “Support”

Who is online

Users browsing this forum: Yahoo [Bot] and 7 guests