ifesdjeen commented on code in PR #3274:
URL: https://github.com/apache/cassandra/pull/3274#discussion_r1598380736


##########
src/java/org/apache/cassandra/concurrent/FutureTask.java:
##########
@@ -89,6 +89,34 @@ protected boolean tryFailure(Throwable t)
 
     public static <T> Callable<T> callable(Runnable run)
     {
+        if (run instanceof DebuggableTask.RunnableDebuggableTask)
+        {
+            return new DebuggableTask.CallableDebuggableTask<T>()
+            {
+                final RunnableDebuggableTask task = (RunnableDebuggableTask) 
run;
+                public T call()
+                {
+                    run.run();
+                    return null;
+                }
+
+                public long creationTimeNanos()
+                {
+                    return task.creationTimeNanos();
+                }
+
+                public long startTimeNanos()
+                {
+                    return task.startTimeNanos();
+                }
+
+                public String description()
+                {
+                    return task.description();
+                }
+            };
+        }

Review Comment:
   I think I have first tried to do it very similarly to how you did it, but 
this has ported better to other branches. Please let me know how you want to 
proceed.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to