Colton Idle
05/23/2024, 4:53 AMchain.request.newBuilder().header("blah", myValue)
to
chain.request.newBuilder().header("blah", myValue.invoke())
It seems like this works and now I don't have to use a runblocking... but this seems too simple and my spidey sense is telling me that I'm actually making a bigger mistake here because on each network call I'm going to call myValue.invoke(). Am I missing anything here. Should I try to use a flowable? Kotlin lazy? Will invoke() get called on every network request so I'm actually creating a bottleneck?
It was a simple ask from my TPM. "Hey take this static field and actually just read it from I/O" but since the okhttpClient is needed early in my code, we don't want to surround it with a runBlocking.ephemient
05/23/2024, 1:51 PMColton Idle
05/23/2024, 1:51 PMColton Idle
05/23/2024, 1:52 PM