473,386 Members | 1,873 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Concurrency

Are there any indicators for

1) whether the C++ commitee will include
concurrency in the next standard
2) what it will look like (Java, ZThreads, etc.)

/David

Jul 22 '05 #1
17 2120
On Wed, 21 Jan 2004 01:30:59 +0100, David Rasmussen <da*************@gmx.net> wrote:
Are there any indicators for

1) whether the C++ commitee will include
concurrency in the next standard
2) what it will look like (Java, ZThreads, etc.)


Probably Boost Threads, if anything. Check out
<url: http://www.boost.org/libs/thread/doc/index.html>.
Alternatively pthreads.

But I hope such support isn't added this time.

Not having thread handling standardized reflects the situation that
the standard library isn't designed for multithreading, that 'volatile'
is next to unusable, and so on. In particular, there is the thorny
issue of exceptions in threads. And the somewhat larger picture of
exception importance levels, the next to unusable exception hierarchy,
and handling of multiple exceptions and exceptions in destructors,
which if addressed needs to be compatible and integrated with threads.
Jul 22 '05 #2
On Wed, 21 Jan 2004 01:30:59 +0100 in comp.lang.c++, David Rasmussen
<da*************@gmx.net> was alleged to have written:
Are there any indicators for

1) whether the C++ commitee will include
concurrency in the next standard
2) what it will look like (Java, ZThreads, etc.)


The newsgroup for the discussion of the C++ standardization process and
what the C++ committee will do is comp.std.c++ (please read first before
posting.)
http://groups.google.com/groups?scor...mp.std.c%2B%2B

Jul 22 '05 #3
Alf P. Steinbach wrote:

Probably Boost Threads, if anything. Check out
<url: http://www.boost.org/libs/thread/doc/index.html>.
Alternatively pthreads.

Pthreads? Surely, if anything, it will be an OOP
approach.

Not having thread handling standardized reflects the situation that
the standard library isn't designed for multithreading, that 'volatile'
is next to unusable, and so on.
Still, many incarnations of the standard library
exist that cope well with concurrency? It's not
impossible.
In particular, there is the thorny
issue of exceptions in threads.
It works reasonably well in Java, doesn't it?
And the somewhat larger picture of
exception importance levels, the next to unusable exception hierarchy,
and handling of multiple exceptions and exceptions in destructors,
which if addressed needs to be compatible and integrated with threads.


I'm not sure these problems are greater than the
problem of not having a standardized concurrency
model in the language.

But I see now that my discussion is off topic, so:
sorry :)

/David

Jul 22 '05 #4

David Rasmussen wrote:

Alf P. Steinbach wrote:

Probably Boost Threads, if anything. Check out
<url: http://www.boost.org/libs/thread/doc/index.html>.
Alternatively pthreads.

Pthreads? Surely, if anything, it will be an OOP
approach.


It will be both Boost.Thread-like stuff in <thread> and 100%
pthreads compatible stuff in <cthread>. I bet a bottle of
"Tisserand", Alf. ;-)

Not having thread handling standardized reflects the situation that
the standard library isn't designed for multithreading, that 'volatile'
is next to unusable, and so on.


Still, many incarnations of the standard library
exist that cope well with concurrency? It's not
impossible.
In particular, there is the thorny
issue of exceptions in threads.


It works reasonably well in Java, doesn't it?


Java's EH is totally brain-damaged.

regards,
alexander.
Jul 22 '05 #5
Alexander Terekhov wrote:

Java's EH is totally brain-damaged.


Why?

/David

Jul 22 '05 #6

David Rasmussen wrote:

Alexander Terekhov wrote:

Java's EH is totally brain-damaged.


Why?


Because you can't have throw() code in Java, to begin with.

regards,
alexander.
Jul 22 '05 #7
Alexander Terekhov wrote:

Because you can't have throw() code in Java, to begin with.


I'm not sure I follow. A small example comparing
C++ and Java, showing your point?

/David

Jul 22 '05 #8

David Rasmussen wrote:

Alexander Terekhov wrote:

Because you can't have throw() code in Java, to begin with.

I'm not sure I follow.


http://google.com/groups?selm=3D09E7...7350A%40web.de
A small example ...


http://google.com/groups?selm=3D0A3F...1F08F%40web.de

regards,
alexander.
Jul 22 '05 #9
Alexander Terekhov wrote:

http://google.com/groups?selm=3D09E7...7350A%40web.de

A small example ...

http://google.com/groups?selm=3D0A3F...1F08F%40web.de


None of these links meant anything to me. Maybe I
lacked the context. But I'll take your word for
it. All I know is that what little concurrent
programming I did in Java with exceptions
involved, worked flawlessly.

/David

Jul 22 '05 #10

David Rasmussen wrote:
[...]
None of these links meant anything to me. Maybe I
lacked the context. But I'll take your word for
it.
Don't take my word. Click on "View: Complete Thread"
and study the context.
All I know is that what little concurrent
programming I did in Java with exceptions
involved, worked flawlessly.


Miracles Happen To Believers, you know.

regards,
alexander.
Jul 22 '05 #11
Alexander Terekhov wrote:
David Rasmussen wrote:
[...]
None of these links meant anything to me. Maybe I
lacked the context. But I'll take your word for
it.
Don't take my word. Click on "View: Complete Thread"
and study the context.


Will do, when I get the time. But I really wish that a simple example
could be given, not just an esoteric one.

Miracles Happen To Believers, you know.


I am not a Java believer. I like C++ much more. But the few times I had
to use Java and had to do something concurrently and with exceptions, I
had met no limitations.

/David

Jul 22 '05 #12
I did not find anything particularly useful in those links.

Without pretending to understand every detail of that particular thread,
I will give you my opinion...

Unknown errors might happen at anytime. The fact that the documentation
states that at any point in time the Java VM can crash does not imply
that exceptions in threads is broken in Java and the VM is "brain-damaged".

Think about what happens in any Unix environment when you get a SIGPIPE
or SIGSEGV. It is very unlikely that ANY mechanism implemented in C++
would prevent those errors, as they are outside the boundaries of the
language, and the behavios of the process at that point is undefined.

I think that in general, the Java thread and exception models are well
designed and implemented.

Jorge L

Alexander Terekhov wrote:
David Rasmussen wrote:
Alexander Terekhov wrote:
Because you can't have throw() code in Java, to begin with.


I'm not sure I follow.

http://google.com/groups?selm=3D09E7...7350A%40web.de

A small example ...

http://google.com/groups?selm=3D0A3F...1F08F%40web.de

regards,
alexander.

Jul 22 '05 #13
Jorge Rivera wrote:

I think that in general, the Java thread and exception models are well
designed and implemented.


They are certainly better than not having a standard at all. And it is
not like C++ is a perfect language which must not be befouled with
unperfect things. C++ is full of ugly solutions, primarily stemming from
C. I am not saying that we shouldn't care about the quality of the
language, quite the opposite. But I don't see the harm (quite the
opposite), in standardizing concurrency in some reasonable way. When we
get more knowledge about the choices made, we can change the language
later. That's how it is done now with other features. What separates
concurrency from all the other half-hearted hybrid features of C++?

/David
Jul 22 '05 #14

Jorge Rivera wrote:
[...]
Think about what happens in any Unix environment when you get a SIGPIPE
or SIGSEGV. It is very unlikely that ANY mechanism implemented in C++
would prevent those errors, as they are outside the boundaries of the
language, and the behavios of the process at that point is undefined.


The behavior of the PROCESS ta that point is fully defined in the
"standard Unix environment" (which is nothing but extended ISO C
environment). Some implementation even convert synchronous signals
to implementation-defined exceptions (that's because the C++ std
says that C++ "might not work" in signal handlers, I guess ;-) )
and you can catch them using C++ catch(...). You might want to
take a look at "is catch(...) safe" c.l.c++.mod thread.

regards,
alexander.
Jul 22 '05 #15
In article <4p*****************@twister.nyroc.rr.com>,
jo*****@rochester.rr.com says...
I did not find anything particularly useful in those links.


That's what you should expect with Alexander -- he specializes in
posting references that don't really refer to the question at hand. If
you're willing to spend enough time chasing, you'll almost always find
something relevant -- but it'll just be another instance of him making
the same unsupported statement he's made in the current thread.

The reality is that Alexander is a smart guy and he knows a lot about
concurrent programming. Most of the statements he makes are correct,
but his actual contribution to the average thread is a negative one --
following the links he posts is normally just about the slowest, most
inefficient possible way of learning anything (except that Alexander
posts a LOT of stupid links, as if making the same unsupported assertion
before acts as proof when he makes it again). You'd be more likely to
learn something by choosing a book blindfolded, and then reading it in
the hope that it might accidentally be related to something you care
about.

--
Later,
Jerry.

The universe is a figment of its own imagination.
Jul 22 '05 #16
Jerry Coffin wrote:
In article <4p*****************@twister.nyroc.rr.com>,
jo*****@rochester.rr.com says...
I did not find anything particularly useful in those links.

That's what you should expect with Alexander -- he specializes in
posting references that don't really refer to the question at hand. If
you're willing to spend enough time chasing, you'll almost always find
something relevant -- but it'll just be another instance of him making
the same unsupported statement he's made in the current thread.

The reality is that Alexander is a smart guy and he knows a lot about
concurrent programming. Most of the statements he makes are correct,
but his actual contribution to the average thread is a negative one --
following the links he posts is normally just about the slowest, most
inefficient possible way of learning anything (except that Alexander
posts a LOT of stupid links, as if making the same unsupported assertion
before acts as proof when he makes it again). You'd be more likely to
learn something by choosing a book blindfolded, and then reading it in
the hope that it might accidentally be related to something you care
about.

Thanks for the insight... lol

Jorge L
Jul 22 '05 #17
Alexander Terekhov wrote:
Jorge Rivera wrote:
[...]
Think about what happens in any Unix environment when you get a SIGPIPE
or SIGSEGV. It is very unlikely that ANY mechanism implemented in C++
would prevent those errors, as they are outside the boundaries of the
language, and the behavios of the process at that point is undefined.

The behavior of the PROCESS ta that point is fully defined in the
"standard Unix environment" (which is nothing but extended ISO C
environment). Some implementation even convert synchronous signals
to implementation-defined exceptions (that's because the C++ std
says that C++ "might not work" in signal handlers, I guess ;-) )
and you can catch them using C++ catch(...). You might want to
take a look at "is catch(...) safe" c.l.c++.mod thread.


Thanks, I will verify that to understand better.

However, the point I was trying to make is that there are system
conditions in which *ANY* language might fail, regardless of code
correctness and exception mechanisms, therefore I don't think that Java
is particularly fickle because it could 'crash at any time'.

Yes, the Java VM could fatally fail, and so could any mechanisms in the
C++ language.

regards,
alexander.

Jul 22 '05 #18

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

Similar topics

16
by: aurora | last post by:
Hello! Just gone though an article via Slashdot titled "The Free Lunch Is Over: A Fundamental Turn Toward Concurrency in Software" http://www.gotw.ca/publications/concurrency-ddj.htm]. It argues...
4
by: Charlie Williams | last post by:
I am having difficulty performing updates and deletions on an Access database using the Update() method of the OleDBDataAdapter. I can insert rows without a problem, but I get a concurrency...
3
by: Suzanne | last post by:
Hi All I'm having problems getting my data adapter to throw a concurrency exception with an INSERT command. I want to throw a concurrency exception if an attempt is made to enter a row into...
2
by: xAvailx | last post by:
I have a requirement that requires detection of rows deleted/updated by other processes. My business objects call stored procedures to create, read, update, delete data in a SQL Server 2000 data...
4
by: Robert Schuldenfrei | last post by:
Dear NG, I was about to "improve" concurrency checking with a Timestamp when I discovered that my current code is not working. After about a day of beating my head against the wall, I am...
8
by: Mike Kelly | last post by:
I've chosen to implement the "optimistic concurrency" model in my application. To assist in that, I've added a ROWVERSION (TIMESTAMP) column to my main tables. I read the value of the column in my...
4
by: Bob | last post by:
While testing my my program I came up with a consistency exception. My program consists of three datagridviews, One called dgvPostes which is the parent grid and its two children,one called...
7
by: William E Voorhees | last post by:
I'm updating an Access database in a windows multi-user environment. I'm using disconnected data I read data from an Access Data table to a data object I update the data object from a...
3
by: John | last post by:
Hi I have a vs 2003 winform data app. All the data access code has been generated using the data adapter wizard and then pasted into the app. The problem I have is that I am getting a data...
5
by: John | last post by:
Hi I have developed the following logic to handle db concurrency violations. I just wonder if someone can tell me if it is correct or if I need a different approach.Would love to know how pros...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

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.