diff options
| author | Jeff Carr <[email protected]> | 2025-01-11 04:27:45 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-01-11 04:27:45 -0600 |
| commit | 0edc28106a070e7dbb07079c51a3e84da137bfae (patch) | |
| tree | d0e65c784576784b666f00ac0e96d948a5b913b4 /generateMutex.go | |
| parent | 1f9e4a682d3acf36aa7ee1279f1f9cc928bcd5fd (diff) | |
working on LOCK
Diffstat (limited to 'generateMutex.go')
| -rw-r--r-- | generateMutex.go | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/generateMutex.go b/generateMutex.go index f9e143e..aaa68a5 100644 --- a/generateMutex.go +++ b/generateMutex.go @@ -17,16 +17,17 @@ func (pf *File) syncLock(w io.Writer) { var LOCK string = pf.Base.Lockname // if the Marshall code changes, this will have to change fmt.Fprintln(w, "// a simple global lock") - fmt.Fprintln(w, "") - fmt.Fprintln(w, "// this is needed because it seems Marshal() fails if locks are in the structs (?)") - fmt.Fprintln(w, "// this might just be a syntactical runtime error. notsure.") - fmt.Fprintln(w, "// maybe this autogen tool will help someone that actually knows what is going on inside") - fmt.Fprintln(w, "// go/src/google.golang.org/protobuf/proto/proto_methods.go") - fmt.Fprintln(w, "// go/src/google.golang.org/protobuf/proto/encode.go") - fmt.Fprintln(w, "// my guess is that Marshal() needs to be told to ignore sync.RWMutex as it ephemeral and can't be stored") - fmt.Fprintln(w, "") fmt.Fprintln(w, "var "+LOCK+" sync.RWMutex") fmt.Fprintln(w, "") + /* + fmt.Fprintln(w, "") + fmt.Fprintln(w, "// this is needed because it seems Marshal() fails if locks are in the structs (?)") + fmt.Fprintln(w, "// this might just be a syntactical runtime error. notsure.") + fmt.Fprintln(w, "// maybe this autogen tool will help someone that actually knows what is going on inside") + fmt.Fprintln(w, "// go/src/google.golang.org/protobuf/proto/proto_methods.go") + fmt.Fprintln(w, "// go/src/google.golang.org/protobuf/proto/encode.go") + fmt.Fprintln(w, "// my guess is that Marshal() needs to be told to ignore sync.RWMutex as it ephemeral and can't be stored") + */ } func (pb *Files) addMutex(f *File) error { |
