Shared Delegates

Robert Jacques sandford at jhu.edu
Wed Oct 19 19:38:13 PDT 2011


On Wed, 19 Oct 2011 20:51:25 -0400, Michel Fortin <michel.fortin at michelf.com> wrote:
> On 2011-10-19 21:53:12 +0000, Andrew Wiley <wiley.andrew.j at gmail.com> said:

[snip]

Also, I how shared works is being misunderstood. Making a class synchronized should limit all member functions and field to being shared or immutable, but it doesn't place any limits on the argument to the member functions. So in the below:

synchronized class Thing2 {
	void doSomeWork(int i) {}
	void doSomeOtherWork(Thing2 t) {}
	void work() {}
}

i is of type int, not shared(int).


More information about the Digitalmars-d mailing list