使われなくなった WaitNotifyHelper を削除

This commit is contained in:
tateisu 2020-12-09 05:33:18 +09:00
parent f18e136905
commit e8536843a6
1 changed files with 0 additions and 32 deletions

View File

@ -1,32 +0,0 @@
package jp.juggler.subwaytooter.util;
import androidx.annotation.NonNull;
// このクラスをkotlinに変換しないこと
// Kotlin wait/notify をサポートしてない
// しかしConcurrent ライブラリには notify() を直接表現できるクラスがない
// 仕方がないのでJavaコード経由でwait/notifyを呼び出す
@SuppressWarnings("SynchronizationOnLocalVariableOrMethodParameter")
public class WaitNotifyHelper {
public static void waitEx( @NonNull Object obj, long ms ){
try{
synchronized( obj ){
obj.wait( ms );
}
}catch( InterruptedException ignored ){
}
}
public static void notifyEx( @NonNull Object obj ){
try{
synchronized( obj ){
obj.notify();
}
}catch( Throwable ignored ){
}
}
}