|
Boost : |
From: Beman Dawes (bdawes_at_[hidden])
Date: 2001-09-10 09:59:46
At 10:13 AM 9/10/2001, Ed Brey wrote:
>[Including Windows.h in header]
>> It's more a problem with macro clashes caused by Windows.h and
>> portable code. I'm not likely to budge on this, since inlining makes
>> little difference in performance here.
>
>Understandable. Just out of curiosity, what kind of applications are
>out there that are compiled on win32, use threads, and don't alreayd
>include <windows.h> for something else.
The commercial software I make my living from includes a library plus some
console mode programs which use the library. Both programs and library
must be highly portable, so don't include <windows.h>. No use of
multi-threading originally, although a set of programming practices were
followed which tended to make the code thread-safe.
I've had good luck turning one of the programs into a multi-threaded app
using a early version of Boost.Threads. Worked first try on both single
and multi-processor machines.
It would certainly cause concern if windows.h was included. That has
happened inadvertently a few times in the past, and caused (minor)
problems. It also means certain failures won't show until porting to other
platforms, which is viewed as a bad thing.
For this type of very portable software, including windows.h in the public
Boost.Thread headers would be seen as a bit of a reduction in
quality-of-implementation. Not a showstopper, however.
--Beman
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk