package Ġarrow . test . concurrency Ċ Ċ import Ġkotlinx . coroutines . experimental . Coroutine Dispatcher Ċ import Ġkotlinx . coroutines . experimental . as Coroutine Dispatcher Ċ import Ġjava . util . concurrent . Linked Blocking Deque Ċ import Ġjava . util . concurrent . Thread Factory Ċ import Ġjava . util . concurrent . ThreadPoolExecutor Ċ import Ġjava . util . concurrent . TimeUnit Ċ Ċ fun Ġnew Coroutine Dispatcher ( name : ĠString ): ĠCor outine Dispatcher Ġ= ĊĠ ĠThreadPool Executor ( 1 0 , Ġ 5 0 , Ġ 3 0 , ĠTimeUnit . SECONDS , ĠLinked Blocking Deque (), ĠThread Factory Ġ{ Ġrun Ġ-> ĊĠĠĠ ĠThread ( run ). apply Ġ{ ĊĠĠĠĠĠ Ġthis . name Ġ= Ġname ĊĠĠĠ Ġ} ĊĠ Ġ}). as Coroutine Dispatcher ()