does expose always use threadLocals? i thought tha...
# exposed
c
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.
e
I think you're supposed to use
suspendedTransaction { }
when working with coroutines
c
thanks! my question was more general in regards of explicit dependencies vs implicit dependencies and api design