This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Original code: https://www.techyourchance.com/concurrency-frameworks-overrated-android/ | |
import io.reactivex.Single | |
import io.reactivex.disposables.Disposable | |
import io.reactivex.functions.BiFunction | |
import io.reactivex.functions.Consumer | |
import io.reactivex.schedulers.Schedulers | |
import java.io.File | |
import java.io.IOException | |
import java.util.concurrent.CountDownLatch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Original code: https://www.techyourchance.com/concurrency-frameworks-overrated-android/ | |
import io.reactivex.Observable | |
import io.reactivex.disposables.Disposable | |
import io.reactivex.functions.BiFunction | |
import io.reactivex.functions.Consumer | |
import io.reactivex.schedulers.Schedulers | |
import java.io.File | |
import java.io.IOException | |
import java.util.concurrent.CountDownLatch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun main() { | |
val transformation = Transformation.TransformationComposite(listOf(Transformation.NoOpTransformation())) | |
println("Res: ${transformation(Shape())}") | |
} | |
class Shape | |
sealed class Transformation { | |
class NoOpTransformation : Transformation() | |
class TransformationComposite(val transformations: List<Transformation>) : Transformation() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.betclic.test | |
import org.junit.After | |
import org.junit.Before | |
interface Rule { | |
fun onBefore() {} | |
fun onAfter() {} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MainActivity : AppCompatActivity() { | |
private var switchFromIoToCompute = 0L | |
private var switchFromComputeToIo = 0L | |
private var loopCount = 0L | |
private var appCreated = 0L | |
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) |