473,722 Members | 2,264 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Threading in new C++ standard

Rather than create a new way of doing things:
http://www.open-std.org/jtc1/sc22/wg...008/n2497.html
why not just pick up ACE into the existing standard:
http://www.cse.wustl.edu/~schmidt/ACE.html
the same way that the STL (and subsequently BOOST) have been subsumed?
Since it already runs on zillions of platforms, they have obviously worked
most of the kinks out of the generalized threading and processes idea (along
with many other useful abstractions).

Even more interesting than generalized threading would be generalized
software transactions. The Intel compiler has an experimental version that
does this:
http://softwarecommunity.intel.com/a...s/eng/1460.htm

As we scale to larger and larger numbers of CPUs, the software transaction
model is the one that gains traction. This document is very illuminating in
that regard:
http://internap.dl.sourceforge.net/s..._submitted.pdf


** Posted from http://www.teranews.com **
Jun 27 '08 #1
126 6713
Dann Corbit wrote:
Rather than create a new way of doing things:
http://www.open-std.org/jtc1/sc22/wg...008/n2497.html
why not just pick up ACE into the existing standard:
http://www.cse.wustl.edu/~schmidt/ACE.html
the same way that the STL (and subsequently BOOST) have been subsumed?
Since it already runs on zillions of platforms, they have obviously worked
most of the kinks out of the generalized threading and processes idea (along
with many other useful abstractions).
It's not a new way. Its from boost.

Click on the Link for n2497, scroll down and read:

"Acknowledgment s
The overall design of this threading library is based on William Kempf's
Boost.Thread Library, as refined by literally hundreds of other Boost users
and contributors."

--
Thomas
http://www.netmeister.org/news/learn2quote.html
"Some folks are wise, and some otherwise."
Jun 27 '08 #2
Sam
Dann Corbit writes:
Rather than create a new way of doing things:
http://www.open-std.org/jtc1/sc22/wg...008/n2497.html
why not just pick up ACE into the existing standard:
http://www.cse.wustl.edu/~schmidt/ACE.html
Perhaps because not everyone shares your enthusiasm for ACE?
the same way that the STL (and subsequently BOOST) have been subsumed?
Boost is not universally liked either. As the saying goes: just because
everyone decides to jump off a cliff, should you follow?

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)

iD8DBQBIBTuRx9p 3GYHlUOIRAs8pAJ 4mbo/nlrRALBXE17a1LA Y0Yz8VIQCfX8Zu
wpfbinv1/+hc7LVtnDL9zsA=
=WbVf
-----END PGP SIGNATURE-----

Jun 27 '08 #3
On Apr 16, 12:28 am, "Dann Corbit" <dcor...@connx. comwrote:
Rather than create a new way of doing things:http://www.open-std.org/jtc1/sc22/wg...008/n2497.html
why not just pick up ACE into the existing
standard:http://www.cse.wustl.edu/~schmidt/ACE.html the same
way that the STL (and subsequently BOOST) have been subsumed?
There are serious problems with the model ACE uses.
Since it already runs on zillions of platforms, they have
obviously worked most of the kinks out of the generalized
threading and processes idea (along with many other useful
abstractions).
It's not actually used on "zillions of platforms"---as far as I
know, it supports Windows and Unix, and that's about it.

ACE is somewhat dated, and uses what was the classical model for
thread objects at the time it was developed. The general
concensus today is that this model isn't really that
appropriate, at least for a language with value semantics like
C++.

The second aspect is that ACE (and Boost, which represents a
more "state of the art" model) only address one of the reasons
threading is desired, and don't effectively support uses like
parallelizing, which are becoming important with the diffusion
of multicore machines.
Even more interesting than generalized threading would be
generalized software transactions. The Intel compiler has an
experimental version that does
this:http://softwarecommunity.intel.com/a...s/eng/1460.htm
I think we're still largely at the beginning when it comes to
knowing the best idioms to support threading. Rather than
standardize something experimental, which later turns out to be
far less than ideal, I think we should only standardize an
essential minimum, on which people can build and experiment.

--
James Kanze (GABI Software) email:ja******* **@gmail.com
Conseils en informatique orientée objet/
Beratung in objektorientier ter Datenverarbeitu ng
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34
Jun 27 '08 #4
On Apr 16, 1:12 am, "Thomas J. Gritzan" <Phygon_ANTIS.. .@gmx.de>
wrote:
Dann Corbit wrote:
Rather than create a new way of doing things:
http://www.open-std.org/jtc1/sc22/wg...008/n2497.html
why not just pick up ACE into the existing standard:
http://www.cse.wustl.edu/~schmidt/ACE.html
the same way that the STL (and subsequently BOOST) have been subsumed?
Since it already runs on zillions of platforms, they have obviously worked
most of the kinks out of the generalized threading and processes idea (along
with many other useful abstractions).
It's not a new way. Its from boost.
Click on the Link for n2497, scroll down and read:
"Acknowledgment s
The overall design of this threading library is based on
William Kempf's Boost.Thread Library, as refined by literally
hundreds of other Boost users and contributors."
Boost only represents a small part of threading in the standard.
Significant parts of the interface will doubtlessly profit from
the experience we've gotten with Boost; other parts are designed
to address lower level threading issues. And of course, Boost
more or less ignored the language issues (you get whatever the
platform gives), which are the most important in a standard.

--
James Kanze (GABI Software) email:ja******* **@gmail.com
Conseils en informatique orientée objet/
Beratung in objektorientier ter Datenverarbeitu ng
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34
Jun 27 '08 #5
Hi James,
>There are serious problems with the model ACE uses.
ACE supports several threading models. Can you please elaborate on
these problems?
>Since it already runs on zillions of platforms, they have
obviously worked most of the kinks out of the generalized
threading and processes idea (along with many other useful
abstractions ).

It's not actually used on "zillions of platforms"---as far as I
know, it supports Windows and Unix, and that's about it.
ACE has been ported to many more platforms than Windows and Unix,
though not surprisingly those are the most common platforms on which
it's used. Please see

http://www.dre.vanderbilt.edu/~schmi...html#platforms

for more info on platforms that ACE has been ported to and the
status of these ports. The status of the builds on the most commonly
used platforms is available in real-time from

http://www.dre.vanderbilt.edu/scoreb...ntegrated.html

Thanks,

Doug
--
Dr. Douglas C. Schmidt Professor and Associate Chair
Electrical Engineering and Computer Science TEL: (615) 343-8197
Vanderbilt University WEB: www.dre.vanderbilt.edu/~schmidt
Nashville, TN 37203 NET: d.*******@vande rbilt.edu
Jun 27 '08 #6
On Apr 15, 3:28 pm, "Dann Corbit" <dcor...@connx. comwrote:
Rather than create a new way of doing things:http://www.open-std.org/jtc1/sc22/wg...008/n2497.html
why not just pick up ACE into the existing standard:http://www.cse.wustl.edu/~schmidt/ACE.html
the same way that the STL (and subsequently BOOST) have been subsumed?
Since it already runs on zillions of platforms, they have obviously worked
most of the kinks out of the generalized threading and processes idea (along
with many other useful abstractions).
First, ACE thread is a library based solution. There are many
discussions on why C++0x thread choose a new language based approach
instead (See <http://www.artima.com/forums/flat.jsp?
forum=226&threa d=180936and Boehm's article of "threads cannot be
implemented as a library").

Second, ACE folks tried to sell it to standard bodys few years ago.
However, instead of going to a language or platform standard
organization (such as relevant committees in ANSI, ISO, IEEE, and
OpenGroup), they went to OMG (see the discussion in this thread
http://groups.google.com/group/comp....b3a5630b1882a).

Ke
>
Even more interesting than generalized threading would be generalized
software transactions. The Intel compiler has an experimental version that
does this:http://softwarecommunity.intel.com/a...s/eng/1460.htm

As we scale to larger and larger numbers of CPUs, the software transaction
model is the one that gains traction. This document is very illuminating in
that regard:http://internap.dl.sourceforge.net/s...paa05_submitte...

** Posted fromhttp://www.teranews.co m**
Jun 27 '08 #7
On Apr 16, 5:39 am, schm...@tango.d re.vanderbilt.e du (Douglas C.
Schmidt) wrote:
Hi James,
There are serious problems with the model ACE uses.

ACE supports several threading models. Can you please elaborate on
these problems?
See http://www.hpl.hp.com/techreports/2004/HPL-2004-209.pdf

Ke
Jun 27 '08 #8
"Dann Corbit" <dc*****@connx. comwrote in message
news:52******** **********@news .teranews.com.. .
Rather than create a new way of doing things:
http://www.open-std.org/jtc1/sc22/wg...008/n2497.html
why not just pick up ACE into the existing standard:
http://www.cse.wustl.edu/~schmidt/ACE.html
the same way that the STL (and subsequently BOOST) have been subsumed?
Since it already runs on zillions of platforms, they have obviously worked
most of the kinks out of the generalized threading and processes idea
(along
with many other useful abstractions).

Even more interesting than generalized threading would be generalized
software transactions. The Intel compiler has an experimental version
that
does this:
http://softwarecommunity.intel.com/a...s/eng/1460.htm
Check this out:

http://groups.google.com/group/comp....e27f5e0570910d
Here is how to completely live-lock their STM:

http://groups.google.com/group/comp....a8ed18e97130b2
It's no where near ready for prime time. STM has issues with scalability and
live-lock.

As we scale to larger and larger numbers of CPUs, the software transaction
model is the one that gains traction. This document is very illuminating
in
that regard:
http://internap.dl.sourceforge.net/s..._submitted.pdf
This is _very_ misleading to say the least. They only talk about live-lock
in terms of transactions getting invalidated by other low-priority
transactions. This is definitely not the only way to live-lock a STM.

Here is just one of many ways:

http://groups.google.com/group/comp....356c832812213b


STM have a whole lot of scaling issues. Here are some of them:

http://groups.google.com/group/comp....ef56a090c052d9
Its no silver-bullet indeed. I would go with distributed message-passing
over STM any day.

Jun 27 '08 #9
On 16 avr, 14:39, schm...@tango.d re.vanderbilt.e du (Douglas C.
Schmidt) wrote:
Hi James,
There are serious problems with the model ACE uses.
ACE supports several threading models. Can you please
elaborate on these problems?
Or no model; like most other libraries, it's just a wrapper for
whatever the implementation gives you.

Seriously, what I was referring to was the fact that you have
(or had, at least) a Thread class, from which the user had to
derive. This was, of course, the accepted practice when ACE
first appeared, but we've found better solutions since then.

There's also the problem, IIRC, that there is no real
distinction between detached threads and joinable threads. (Of
course, ACE isn't alone in that:-).)

--
James Kanze (GABI Software) email:ja******* **@gmail.com
Conseils en informatique orientée objet/
Beratung in objektorientier ter Datenverarbeitu ng
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34
Jun 27 '08 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

22
6587
by: Jorge Godoy | last post by:
Hi! I must have been searching in the wrong places or with the wrong keywords but I couldn't find out how to implement something such as what is done by the threading module on Windows (95, 98 and XP are the ones used by my clients). My preference is for something available in the standard library if possible. I have a simple task where I want my GUI to be able to open several
17
2435
by: Andrae Muys | last post by:
Found myself needing serialised access to a shared generator from multiple threads. Came up with the following def serialise(gen): lock = threading.Lock() while 1: lock.acquire() try: next = gen.next() finally:
4
4902
by: Joe Wong | last post by:
Hi, Is there any way to increase/decrease a thread priority in Python? Best regards, -- Wong
77
5365
by: Jon Skeet [C# MVP] | last post by:
Please excuse the cross-post - I'm pretty sure I've had interest in the article on all the groups this is posted to. I've finally managed to finish my article on multi-threading - at least for the moment. I'd be *very* grateful if people with any interest in multi-threading would read it (even just bits of it - it's somewhat long to go through the whole thing!) to check for accuracy, effectiveness of examples, etc. Feel free to mail...
5
1968
by: Roshan | last post by:
This is regarding the article titled "C++ & Double-Checked Locking" by Scott Meyers and Andrei in DDJ July 2004 issue. I think the reasoning in this article is fundamentally flawed due the authors mixing up a couple of concepts (observable behavior & side effects) that are defined separately in the standard. Background: In the following statement... class Singelton {
4
1260
by: Lionel van den Berg | last post by:
Hi all, I'm just wondering what's the best option for threading in C++? I've used pthreads and forking in C (the latter is not appropriate for my situation now). All I want to do is run a function in a new thread, it's a simple task, no interaction with other threads etc. so I don't have to worry about deadlock, starvation and so on. Thanks,
2
3264
by: Juuso Hukkanen | last post by:
I need a list of multithreading unsafe C (C99) functions/features. comp.programming.threads provided an initial list of C:ish functions, with following ANSI C functions: asctime, gmtime, localtime, ctime, tmpnam, strtok http://www.lambdacs.com/cpt/FAQ.html#Q150 However, extra Googling hinted rand() and srand(), also being unsuitable for multi-threading - opinions? And what is the status of
9
1862
by: cgwalters | last post by:
Hi, I've recently been working on an application which does quite a bit of searching through large data structures and string matching, and I was thinking that it would help to put some of this CPU-intensive work in another thread, but of course this won't work because of Python's GIL. There's a lot of past discussion on this, and I want to bring it up again because with the work on Python 3000, I think it is worth trying
1
4386
by: Seun Osewa | last post by:
Hello, I've tried to run several threading examples in Python 2.5.1 (with Stackless) For example: import threading theVar = 1 class MyThread ( threading.Thread ):
0
9382
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9236
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9154
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9087
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8043
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6681
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5995
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
2
2601
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2147
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.