:wave: hi, i'm developing a game backend using kot...
# coroutines
l
👋 hi, i'm developing a game backend using kotlin which includes saving to the database, and i'm unsure which approach would be best for handling the scope: i currently have a scope tied to the lifecycle of the backend which i
closeAndJoin
when the backend is stopped 1. use the existing scope and wrap database calls in
NonCancellable
2. create a separate scope for saving to the db, which when stopping the server i can make unavailable to launch new jobs, and join without cancelling 3. something else?
Im leaning away from non cancellable because I don't want things to be able to hang forever, I think something like 2 with a timeout + join would be better