Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

Doesn't Trace should compatible with Log ?

Moderators: kris

Posted: 09/21/08 16:12:27

both provide thread-safe output, but they are not compatible.

Trace's synchronization object is cerr, Log's sync object is cerr.stream (should say AppendStream?'s sync object), so use them at the same time would cause problem.

I found this issue when I write a syncprint providing Stdout interface, I copy the constructor code from Trace, but this mine syncprint would cause segment fault when use it with Log at the same time.

After I change mine syncprint's synchronization object from cerr to cerr.stream, things are ok.

Author Message

Posted: 09/21/08 17:03:57

Yes, this fix is already in the SVN repo for the next release. Sorry about that