Skip to content

Commit

Permalink
Benchmark Dispatchers.Unconfined in the benchmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
ShreckYe committed Nov 27, 2024
1 parent 9de472c commit 0ef8aa2
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import kotlinx.coroutines.*

class ParameterizedRunBlockingAwaitAsyncsBenchmark : AbstractBenchmark() {
enum class DispatcherArgumentEnum {
Default, IO, SingleThread
Default, /*Main,*/ Unconfined, IO, SingleThread
}

@Param
Expand All @@ -20,6 +20,8 @@ class ParameterizedRunBlockingAwaitAsyncsBenchmark : AbstractBenchmark() {
runBlocking(
when (dispatcherArgumentEnum) {
DispatcherArgumentEnum.Default -> Dispatchers.Default
//DispatcherArgumentEnum.Main -> Dispatchers.Main
DispatcherArgumentEnum.Unconfined -> Dispatchers.Unconfined
DispatcherArgumentEnum.IO -> Dispatchers.IO
DispatcherArgumentEnum.SingleThread -> singleThreadContext
}
Expand Down

0 comments on commit 0ef8aa2

Please sign in to comment.