Skip to content
Snippets Groups Projects
Commit ff81abf2 authored by brinn's avatar brinn
Browse files

Set the callable name.

SVN: 24032
parent 8e422585
No related branches found
No related tags found
No related merge requests found
......@@ -29,7 +29,7 @@ import ch.systemsx.cisd.base.exceptions.InterruptedExceptionUnchecked;
import ch.systemsx.cisd.base.namedthread.NamingThreadPoolExecutor;
import ch.systemsx.cisd.common.concurrent.ConcurrencyUtilities;
import ch.systemsx.cisd.common.concurrent.ITerminableFuture;
import ch.systemsx.cisd.common.concurrent.TerminableCallable.ICallable;
import ch.systemsx.cisd.common.concurrent.TerminableCallable.INamedCallable;
import ch.systemsx.cisd.common.concurrent.TerminableCallable.IStoppableExecutor;
import ch.systemsx.cisd.common.logging.LogCategory;
import ch.systemsx.cisd.common.logging.LogFactory;
......@@ -188,7 +188,7 @@ public class ServiceConversationServer
final ServiceConversationRecord record = new ServiceConversationRecord(messenger);
conversations.put(serviceConversationId, record);
final ITerminableFuture<Void> controller =
ConcurrencyUtilities.submit(executor, new ICallable<Void>()
ConcurrencyUtilities.submit(executor, new INamedCallable<Void>()
{
public Void call(IStoppableExecutor<Void> stoppableExecutor)
throws Exception
......@@ -224,11 +224,10 @@ public class ServiceConversationServer
return null;
}
// TODO: uncomment once we can name an ICallable.
// public String getCallableName()
// {
// return conversationId + " (" + typeId + ")";
// }
public String getCallableName()
{
return serviceConversationId + " (" + typeId + ")";
}
});
record.setController(controller);
......
......@@ -177,9 +177,9 @@ public class ServiceConversationTest
{
try
{
System.err.println(Thread.currentThread().getName());
while (true)
{
System.err.println(Thread.currentThread().getName());
messenger.send(messenger.receive(String.class));
}
} catch (RuntimeException ex)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment