FAQ

On 2013/11/22 07:30:58, ukai wrote:
Anyway, I'm wondering we should protect Token with mutex in transport, so that
we could use the Client created by serviceaccount.NewClient
concurrently?
or should user create new client on each goroutine?
Yes, this is a good point.
On App Engine we didn't worry because you in that context you need to
create a new client for every request.
But in this case, I can see this being useful.

Please add the lock, so that only one refresh is in flight at once.

https://codereview.appspot.com/30660043/

--

---
You received this message because you are subscribed to the Google Groups "golang-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-dev @
categoriesgo
postedNov 24, '13 at 11:21p
activeNov 24, '13 at 11:21p
posts1
users1
websitegolang.org

1 user in discussion

Adg: 1 post

People

Translate

site design / logo © 2021 Grokbase