Open herzbube opened 11 years ago
A simple solution is to create a marker protocol (e.g. LongRunningAction
) that can be adopted by commands that want to support "long running actions". When CommandProcessor
detects the protocol it posts the start/end notifications before/after command execution begins/ends. Command execution is surrounded with @try/@catch.
One possible problem could be that some commands (LoadGameCommand
?) may not execute all their parts entirely synchronously.
Currently every command implements its own handling for "long running action". This generally includes
doIt
implementation with @try/@catchIt would be cleaner to implement this handling in
CommandProcessor
.