[ 
https://issues.apache.org/jira/browse/HBASE-23563?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Swaroopa Kadam reassigned HBASE-23563:
--------------------------------------

    Assignee: Swaroopa Kadam

> Deprecate Threads shutdown Methods
> ----------------------------------
>
>                 Key: HBASE-23563
>                 URL: https://issues.apache.org/jira/browse/HBASE-23563
>             Project: HBase
>          Issue Type: Improvement
>            Reporter: David Mollitor
>            Assignee: Swaroopa Kadam
>            Priority: Minor
>
> {code:java|title=Threads.java}
>    /**
>    * Shutdown passed thread using isAlive and join.
>    * @param t Thread to shutdown
>    */
>   public static void shutdown(final Thread t) {
>     shutdown(t, 0);
>   }
>   /**
>    * Shutdown passed thread using isAlive and join.
>    * @param joinwait Pass 0 if we're to wait forever.
>    * @param t Thread to shutdown
>    */
>   public static void shutdown(final Thread t, final long joinwait) {
>     if (t == null) return;
>     while (t.isAlive()) {
>       try {
>         t.join(joinwait);
>       } catch (InterruptedException e) {
>         LOG.warn(t.getName() + "; joinwait=" + joinwait, e);
>       }
>     }
>   }
> {code}
> # This method does not actually 'shutdown' anything, it just waits for thread 
> to die uninterruptedly
> # The InterruptedException is lost here
> Please deprecated in favor of Guava's {{Uninterruptibles#joinUninterruptibly}}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to