From: Joel VanderWerf Date: 2008-12-27T01:23:27+09:00 Subject: Re: Are all Ruby built-in objects thread safe? Just Another Victim of the Ambient Morality wrote: > I don't think this is relevant. Concurrency isn't about how many > processors you use. Multitasking systems existed long before SMP hardware > existed. Concurrency is about doing tasks concurrently. If you have one > method running and it may be preempted by another method then they are > running concurrently. If the two methods share data then they may corrupt > that data for each other. This is true regardless of how these > concurrencies, or threads, are implemented. It doesn't matter if they're > hardware supported system threads or if they're Ruby green threads... Keep in mind though that on smp systems, most instructions are not atomic. On a single processor, they are. -- vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407