maxTimeInTask

How much time can each task take.

There is no guarantee that the task will be completed under this time, this is only a hint.

Setting this value too high makes some other main thread tasks (e.g. UI events) be processed with high delays. Setting this value too low makes ObjC/Swift objects be released with high delays which contributes to memory usage.

Default: 5ms

Since Kotlin

1.9

Throws

when value is negative.