79083726

Date: 2024-10-13 17:26:02
Score: 0.5
Natty:
Report link

Using @marks answer with Java Virtual Threads to make it really non-blocking:

private val vtDispatcher = Executors.newVirtualThreadPerTaskExecutor().asCoroutineDispatcher()

suspend fun getAllItems() = withContext(vtDispatcher) {
    itemQueries.selectAll().mapToList()
}
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: frevib