RosettaCodeData/Task/Mutex/D/mutex-3.d

12 lines
220 B
D
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
class Synced {
public int func (int input) {
synchronized(Synced.classinfo) {
// ...
foo += input;
// ...
}
return arg;
}
private static int foo;
}