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)?