12 lines
220 B
D
12 lines
220 B
D
|
|
class Synced {
|
||
|
|
public int func (int input) {
|
||
|
|
synchronized(Synced.classinfo) {
|
||
|
|
// ...
|
||
|
|
foo += input;
|
||
|
|
// ...
|
||
|
|
}
|
||
|
|
return arg;
|
||
|
|
}
|
||
|
|
private static int foo;
|
||
|
|
}
|