From: David ‘Bombe’ Roden Date: Thu, 30 May 2013 04:43:52 +0000 (+0200) Subject: Create threads with decent names. X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=44e662f7a3918b46c3abe6646c1e167a112749c1;p=sonitus.git Create threads with decent names. --- diff --git a/src/main/java/net/pterodactylus/sonitus/data/Pipeline.java b/src/main/java/net/pterodactylus/sonitus/data/Pipeline.java index 66ee2e5..063a0bc 100644 --- a/src/main/java/net/pterodactylus/sonitus/data/Pipeline.java +++ b/src/main/java/net/pterodactylus/sonitus/data/Pipeline.java @@ -167,13 +167,15 @@ public class Pipeline implements Iterable { } } for (Connection connection : connections) { - logger.info(String.format("Starting Connection from %s to %s.", connection.source.name(), FluentIterable.from(connection.sinks).transform(new Function() { + String threadName = String.format("%s → %s.", connection.source.name(), FluentIterable.from(connection.sinks).transform(new Function() { + @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(); } }