okay, there are a few layers in this question
1. First option will run writes in parallel, second sequentially, choose what is suits your use case better
2. Implementing doSomething in a such way is a very bad approach, especially with GlobalScope. Instead, I would just make doSomething suspendable and use
coroutineScope {}
to group writes, so client could launch this suscpend function in own scope using launch, or just call suspend function (which is even better)
3. To make parallel version of this code less awkward I would use something like:
listOf(::writeIntoTable1, ::writeIntoTable2, ::writeIntoTable3).forEach { launch ( it() } }
Or any other way to group operations and do not copy paste invocation strategy
4. i see that you use IO dispatcher which looks suspicious in this case, because you call suspend function which itself never should block, so if write is blocking, just move this IO dispatcher to those functions or make them blocking explicitly, remove suspend modifier and add Blocking suffix