|
Fred could you explain the object locking that goes on in the implementation code in java? When one object is copied to another is the from object locked? Reason being that if thread #1 destroys the object while it is being copied by thread #2 unpredictable results may occur. Do all objects have a reference counter? and is the object locked when the reference counter is increased/decreased? So locking and reference count wise, what happens when a string copy executes? create to string lock from string inc from reference count do the copy ... thank you, Steve Richter -----Original Message----- From: java400-l-admin@midrange.com [mailto:java400-l-admin@midrange.com]On Behalf Of Fred Kulack Sent: Friday, September 20, 2002 1:33 PM To: java400-l@midrange.com Subject: RE: FW: Java Vs RPG on iSeries One of my co-workers said I was scaring people... So I'm probably done now. 8-) Sorry about that. Don't be scared, just be cautious, threads programming is a little more difficult (even in Java) than many people who love Java would have you believe. Just remember to use synchronized {} when sharing data. Here's a good (but very technical) reference. http://www.cs.umd.edu/~pugh/java/memoryModel/ Easiest most clear for me was the "The Java Memory Model, Section 2.2.7 of Concurrent Programming in Java, 2nd edition, Doug Lea, Addison Wesley, 1999". "The stuff we call "software" is not like anything that human society is used to thinking about. Software is something like a machine, and something like mathematics, and something like language, and something like thought, and art, and information... but software is not in fact any of those other things." Bruce Sterling - The Hacker Crackdown Fred A. Kulack - IBM eServer iSeries - Enterprise Application Solutions ERP, Java DB2 access, Jdbc, JTA, etc... IBM in Rochester, MN (Phone: 507.253.5982 T/L 553-5982) mailto:kulack@us.ibm.com Personal: mailto:kulack@magnaspeed.net AIM Home:FKulack AIM Work:FKulackWrk MSN Work: fakulack@hotmail.com _______________________________________________ This is the Java Programming on and around the iSeries / AS400 (JAVA400-L) mailing list To post a message email: JAVA400-L@midrange.com To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/cgi-bin/listinfo/java400-l or email: JAVA400-L-request@midrange.com Before posting, please take a moment to review the archives at http://archive.midrange.com/java400-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.