public void run() {
this.running = true;
try {
// exit execution loop if worker has been stopped
SocialGraphOperation command = null;
while (!this.stopping) {
command = this.commands.take();
command.run(this.graph);
}
} catch (final InterruptedException e) {
// stopped by worker
e.printStackTrace();
} catch (final Exception e) {