[Scheme-reports] Promises that force themselves Alan Manuel Gloria (08 Feb 2013 02:54 UTC)
Re: [Scheme-reports] Promises that force themselves Alex Shinn (08 Feb 2013 04:38 UTC)
Re: [Scheme-reports] Promises that force themselves John Cowan (08 Feb 2013 05:03 UTC)
Re: [Scheme-reports] Promises that force themselves Per Bothner (09 Feb 2013 05:49 UTC)

Re: [Scheme-reports] Promises that force themselves Per Bothner 09 Feb 2013 05:47 UTC

On 02/07/2013 08:37 PM, Alex Shinn wrote:

> We have to be careful of everything in a multithreaded environment.
> The current assumption and existing implementation practice is that
> you need mutex locks for most data-structures.  People tend to
> get passionate about this and insist that certain data-structures must
> be implicitly thread-safe (notably hash-tables, but everyone draws the
> line differently).

In the Java world people moved away from that: The initial JDK 1.0
utility classes (like Vector and Hashtable) had all the methods
synchronized.  More recent thinking is that that is a performance
loser and provides a false sense of correctness: If your program
is single-threaded, then using a mutex is wasteful; if it is
multi-threaded then you almost certainly need to synchronize
based on the actual semantics of your program, and the synchronizing
done in a general-purpose library is unlikely to be sufficient.
--
	--Per Bothner
per@bothner.com   http://per.bothner.com/

_______________________________________________
Scheme-reports mailing list
Scheme-reports@scheme-reports.org
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports