From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,1cf653444208df72 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-10-14 01:18:18 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.tele.dk!small.news.tele.dk!212.43.194.69!fr.clara.net!heighliner.fr.clara.net!proxad.net!feeder2-1.proxad.net!news1-1.free.fr!not-for-mail Message-ID: <3BC9498C.8F8A3998@free.fr> Date: Sun, 14 Oct 2001 10:15:08 +0200 From: Jean-Marc Bourguet X-Mailer: Mozilla 4.7 [en] (X11; I; Linux 2.2.10 i586) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: ada vs. cpp References: <9q7na102nqn@drn.newsguy.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Organization: Guest of ProXad - France NNTP-Posting-Date: 14 Oct 2001 10:18:16 MEST NNTP-Posting-Host: 212.27.55.176 X-Trace: 1003047496 news1-1.free.fr 214 212.27.55.176 X-Complaints-To: abuse@proxad.net Xref: archiver1.google.com comp.lang.ada:14476 Date: 2001-10-14T10:18:16+02:00 List-Id: "Vector..@" wrote: > > In article , whraven@usenet-access.com says... > > What is wrong with pthreads? Wrong level of abstraction, not portable. > Yes, it is not part of the language, but it is a standard (POSIX), and > available in all platforms (except may on windows, I am not sure, but > who cares about widnows anyway). I don't use Windows but would never call something not available on Windows portable. > So, simply do > > #include > > and you are all set. You miss: - add some defines, - check the compiler support this correctly (try once exceptions with gcc 2.95 and threads for one thing for which you need compiler support) and add the corresponding compiler options - check all libraries you use are thread save, included OS libraries and language libraries, and that protecting by mutex the one which are not is enough. > btw, I agree that having threads implemented in the language is better, but > with pthreads around for C/C++ to use, this argument is not very strong. Well, stronger than you think (look up the threads on c.l.c++.m where one speak on threads). -- Jean-Marc