Thanks Val, I actually tried that approach... and failed. Perhaps I incorporated it wrong. I put the handling of locking/unlocking of the map[string]*sync.Mutex in it's own function, which was encapsulated in the global mutex like you suggested. Only problem was, was that the database function ran once... because when it went to call the function that handled the unlocking of the map[string]*sync.Mutex, it was already locked by a previous goroutine trying to lock the map[string]*sync.Mutex.
Hahaha... I hope I made sense. My brain is hurting here. It doesn't help that I'm fairly new to this type of stuff in Go. Appreciate you assistance, however. Thank you! On Thursday, December 29, 2016 at 1:28:34 AM UTC-6, Val wrote: > > Hello Eric > You may use a map[string]*sync.Mutex where key is the DB filepath, and > protect that map with a global mutex. > > Note that a mutex value must not be copied, often it is necessary to use > pointers. > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.