Skip to content
CodeWiki
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
Search
⌘K
English
English
Chinese
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
English
English
Chinese
Practice
/
Quiz
/
Backend
/
Kotlin backend development
What does adding `suspend` to a function that calls blocking JDBC guarantee?
from Kotlin backend development
Kotlin 2.4.10 / Ktor 3.5.1 / Java 25 LTS
intermediate
1 min
What does adding `suspend` to a function that calls blocking JDBC guarantee?
The JDBC call releases its thread while waiting.
The function may call suspending APIs, but JDBC remains blocking.
The database transaction becomes cancellable.
Ktor moves the call to Dispatchers.IO automatically.
Check
Ask AI about this kata
Report an error
previous kata
Spot the bug in the coroutine error mapper
Spot the bug
A new version is available
Reload