kevin Abel wrote:My murach Java book keeps using the term "Thread Safe"
What does this mean?...
You have read that part wrongly. Regard AWT display components as obsolete.
kevin Abel wrote:. . . AWT being newer than the old GUI thing. . . .
kevin Abel wrote:I found some others asking about "thread safe" in Code Ranch. It has something to do with multiple threads accessing the same classes.
The non‑display AWT classes include Color, layout managers, and listeners, and they are all still in regular use with Swing®. Many Swing® display classes are subtypes of AWT classes, too.
Tim Holloway wrote:. . . AWT does have some utility still . . . there are parts of Swing that do build on AWT. . . .
kevin Abel wrote:
It reminds me of the old days of my dBase programming where two PCs running the same software were attempting to write to the same cell in a table. They were sort of like threads but from two different machines.
Andrew Jerpe wrote:I think it means that if a running piece of code is executing normally, and it needs to create a new separate thread to perform a separate task, ( like updating some remote data access, then the new threads is not allowed to disrupt any other thread that may be accessing the same resource. The disruption could cause data to be lost or distorted if two different treads tried to do an update operation at the same time. "Thread-safe" code protects against that....
Roses are red, violets are blue. Some poems rhyme and some don't. And some poems are a tiny ad.
Two software engineers solve most of the world's problems in one K&R sized bookhttps://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton