The correct way to do this is a nested synchronized statement:```d synchronized(from) synchronized(to) { ... } ``` -Steve
This code compiles:
```
import std.stdio;
void main()
{
}
class BankAccount
{
}
void transferMoney(shared BankAccount from, shared BankAccount to)
{
synchronized (from) synchronized (to) // ← correct
{
// ...
}
}
```
