Do you really need pointers tonyour structs in the map? Because that causes the headache here: if no pointers, then simply rlock-ing the map, copying / serializing would be enough.
Could even have two maps, each gets every modification, except when copying, when the secondary is serialized, thn updated with the accumulated changes. With a goroutine managing the secondary, executing commands (update, delete, marshal) from a buffered channel, this wouldn't uterfere with the main map. -- 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.