Overview
Features
Download
Documentation
Community
Add-Ons & Services

Thread and LogStream

Please post support and help requests here.

Thread and LogStream

Postby cx500tc » 19 Jun 2008, 17:41

Hello,

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?

cx500tc
 
Posts: 26
Joined: 24 Sep 2007, 17:48

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.
guenter
 
Posts: 1157
Joined: 11 Jul 2006, 16:27
Location: Austria


Return to Support

Who is online

Users browsing this forum: No registered users and 3 guests