Creating a shared reference type

Minas Mina minas_mina1990 at hotmail.co.uk
Sat Jul 14 02:15:54 PDT 2012


Thanks, I've got another problem:

void f()
{
	sema.wait();
	
	++x;
	
	sema.notify();
}

sema is the global shared Semaphore (as above)

main.d(29): Error: function core.sync.semaphore.Semaphore.wait () 
is not callable using argument types () shared
main.d(29): Error: expected 1 function arguments, not 0
main.d(33): Error: function core.sync.semaphore.Semaphore.notify 
() is not callable using argument types () shared

Why isn't it working as I am expecting it to? Isn't this the way 
shared is used (or should be used)?


More information about the Digitalmars-d-learn mailing list