Create threads with decent names.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Thu, 30 May 2013 04:43:52 +0000 (06:43 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Thu, 30 May 2013 04:43:52 +0000 (06:43 +0200)
src/main/java/net/pterodactylus/sonitus/data/Pipeline.java

index 66ee2e5..063a0bc 100644 (file)
@@ -167,13 +167,15 @@ public class Pipeline implements Iterable<ControlledComponent> {
                        }
                }
                for (Connection connection : connections) {
-                       logger.info(String.format("Starting Connection from %s to %s.", connection.source.name(), FluentIterable.from(connection.sinks).transform(new Function<Sink, String>() {
+                       String threadName = String.format("%s → %s.", connection.source.name(), FluentIterable.from(connection.sinks).transform(new Function<Sink, String>() {
+
                                @Override
                                public String apply(Sink sink) {
                                        return sink.name();
                                }
-                       })));
-                       new Thread(connection).start();
+                       }));
+                       logger.info(String.format("Starting Thread: %s", threadName));
+                       new Thread(connection, threadName).start();
                }
        }