Ideally, I would also want to use the gorilla/mux library. Any ideas on how to "handle" this ?
thanks jose
Jesse McNelis
unread,
Oct 17, 2013, 9:57:46 PM10/17/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Jose, golang-nuts
If you want to wrap a non thread-safe library the best option is to have a single goroutine responsible for it and have other goroutines submit requests over a channel.
Generally it's best for them to submit their request along with a channel for the reply.
You don't need to intentionally make the http requests process serially because all you need is serial access to the library which communicating with a single goroutine will provide.