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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII X-Google-Thread: 103376,52fd60a337c05842 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-06-17 02:48:50 PST Message-ID: <3D0DAFB6.29C5D591@sympatico.ca> From: David Marceau X-Mailer: Mozilla 4.79 [en] (X11; U; Linux 2.4.17-10mdksmp i686) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: ada paper critic References: <8avjgu8bnkifee01ffu5i4h247n3khl7ub@4ax.com> <3D0A075F.482703FE@san.rr.com> <3D0CA980.5050505@worldnet.att.net> <3D0D605B.F86B0670@san.rr.com> <3D0D6AEE.80304@worldnet.att.net> Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Date: Mon, 17 Jun 2002 05:45:26 -0400 NNTP-Posting-Host: 65.92.166.10 X-Complaints-To: abuse@sympatico.ca X-Trace: news20.bellglobal.com 1024307251 65.92.166.10 (Mon, 17 Jun 2002 05:47:31 EDT) NNTP-Posting-Date: Mon, 17 Jun 2002 05:47:31 EDT Organization: Bell Sympatico Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!bloom-beacon.mit.edu!newsswitch.lcs.mit.edu!snoopy.risq.qc.ca!sunqbc.risq.qc.ca!torn!webster!nf1.bellglobal.com!nf2.bellglobal.com!news20.bellglobal.com.POSTED!not-for-mail Xref: archiver1.google.com comp.lang.ada:26131 Date: 2002-06-17T05:45:26-04:00 List-Id: > > I tried to describe why you cannot simply build your own entry queues > in Java. Concerning building something like entry queues, the following book: High Performance Java Platform Computing http://www.toolsofcomputing.com/JavaThreads/ describes an entire infrastructure of java classes which attempts to compensate for the lack of concurrency capability in the java language. For example it describes an infrastructure for building a threadpool and then using a runnablequeue to feed them as each thread completes a runnable's task. The book even mentions the MEMO and MPI infrastructures at the end however it was very brief and left the reader to figure out what they meant in their code. As it stands it is the best java thread book out there. > The problem is the Java definition of the wait() and > notify() methods. They control thread suspension and activation due > to changes in shared object conditions. > They provide completely > non-deterministic results when activating a suspended thread. I hear you. Like the java language itself, all the java threading books I read did not help to save time when debugging run-time erratic behaviour(like what you said non-deterministic results i.e. memory leaks) in the application caused by a mix of a concurrency class infrastructure mixed with human coders. I guess that makes me a bad debugger guy eh? > You > have no access to the way they work, nor can you redefine their > operation without encountering rather nasty behaviors in the Java > memory model, which is generally NOT implemented as defined for the > Java Virtual Machine. I hear you concerning the memory model :) Java claims Garbage-Collection. Java doesn't garbage collect Thread Classes. This makes for a lot of coding work-arounds. At least c/c++ never claimed to have garbage collection before displaying memory leaks behaviour. At least c/c++ coders deep down inside know their code isn't bullet proof until they add the defensive programming(a reasonable amount of checks and exception handling stuff) and test it on the target (anywhere) platform. At least c/c++/ada have a debugger that can go anywhere and attach to any process even a java process. Sant� bonheur, David Marceau