Skip to content

Instantly share code, notes, and snippets.

View IRus's full-sized avatar

Ibragimov Ruslan IRus

View GitHub Profile
fun <T : Any> Future<T>.toDeferred(
scope: CoroutineScope = GlobalScope,
waitTime: Long = 100
): Deferred<T> {
val future = this
val deferred = CompletableDeferred<T>()
var isDone = false
scope.launch {
while (isActive && !isDone) {
@IRus
IRus / keybase.md
Created September 12, 2018 11:44
Verifying myself at keybase

Keybase proof

I hereby claim:

  • I am irus on github.
  • I am heapyhop (https://keybase.io/heapyhop) on keybase.
  • I have a public key ASB225Opy7SqCYCYo3oteYkMacTPA7oaPCeGQUm9I-r8Jwo

To claim this, I am signing this object: