christophsturm

    christophsturm

    1 year ago
    does expose always use threadLocals? i thought that if I pass around a database and always specify the database like
    transaction(db) {..}
    it will avoid threadlocals, but it seems that all exposed calls inside the transaction still get their transaction from a threadlocal. so it only works if the thread stays the same, and for example it wont work if i have callbacks (or coroutines) that potentielly run in different threads.
    Emil Kantis

    Emil Kantis

    1 year ago
    I think you're supposed to use
    suspendedTransaction { }
    when working with coroutines
    christophsturm

    christophsturm

    1 year ago
    thanks! my question was more general in regards of explicit dependencies vs implicit dependencies and api design