Getting started:
Related tutorials:
Getting started:
Related tutorials:
# solr-follower deployment | |
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
labels: | |
app.kubernetes.io/component: solr-follower | |
app.kubernetes.io/name: solr-follower | |
app.kubernetes.io/part-of: solr-deployment | |
name: solr-follower | |
namespace: dev |
# solr-leader deployment | |
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
labels: | |
app.kubernetes.io/component: solr-leader | |
app.kubernetes.io/name: solr-leader | |
app.kubernetes.io/part-of: solr-deployment | |
name: solr-leader | |
namespace: dev |
import kotlinx.coroutines.* | |
import kotlin.system.measureTimeMillis | |
fun main() { | |
runBlocking { | |
val executionTime = measureTimeMillis { | |
val job1 = launch { // Coroutine 1 | |
delay(1000) | |
println("Coroutine 1 completed") | |
} |
import kotlinx.coroutines.* | |
import kotlin.system.measureTimeMillis | |
fun performBlockingOperation(jobName: String) { | |
// Simulating a blocking operation | |
Thread.sleep(1000) | |
println("Blocking operation completed. jobName = $jobName, thread : ${Thread.currentThread().name}") | |
} |
import kotlinx.coroutines.* | |
import kotlin.system.measureTimeMillis | |
fun performBlockingOperation(jobName: String) { | |
// Simulating a blocking operation | |
Thread.sleep(1000) | |
println("Blocking operation completed. jobName = $jobName, thread : ${Thread.currentThread().name}") | |
} | |
suspend fun performBlockingOperationSuspended(jobName: String) { | |
// non-blocking delay - delay() is a suspending function un-like Thread.sleep() | |
delay(1000) | |
println("Blocking operation completed. jobName = $jobName, thread : ${Thread.currentThread().name}") | |
} | |
fun main() = runBlocking { | |
val executionTime = measureTimeMillis { | |
val job1 = launch { |
An application for conducting code review interviews
This service ensures we are following the laws of the City of Atlantis with respect to vacation rental properties. Atlantis requires that: