(Action action)
| 244 | } |
| 245 | |
| 246 | static void dispatchAction(Action action){ |
| 247 | LockingTransaction trans = LockingTransaction.getRunning(); |
| 248 | if(trans != null) |
| 249 | trans.enqueue(action); |
| 250 | else if(nested.get() != null) |
| 251 | { |
| 252 | nested.set(nested.get().cons(action)); |
| 253 | } |
| 254 | else |
| 255 | action.agent.enqueue(action); |
| 256 | } |
| 257 | |
| 258 | void enqueue(Action action){ |
| 259 | boolean queued = false; |