summaryrefslogtreecommitdiff
path: root/redo/zz_test.go
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-08-13 09:57:22 -0400
committerPietro Gagliardi <[email protected]>2014-08-13 09:57:22 -0400
commit59f2eeca22dd15daf9d7765c1709bf926d158faf (patch)
tree52167d7b99844bae71b8e59725b8f12f2f450bf5 /redo/zz_test.go
parente28b791489851b2e5ea6955d29269fa1870c610f (diff)
Figured out why I'm getting intermittent crashes. Worked around for now, but will become a major issue soon...
Diffstat (limited to 'redo/zz_test.go')
-rw-r--r--redo/zz_test.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/redo/zz_test.go b/redo/zz_test.go
index 529c43b..46f00e2 100644
--- a/redo/zz_test.go
+++ b/redo/zz_test.go
@@ -146,12 +146,16 @@ func (tw *testwin) make(done chan struct{}) {
}
}
+// this must be on the heap thanks to moving stacks
+// soon even this won't be enough...
+var tw *testwin
+
// because Cocoa hates being run off the main thread, even if it's run exclusively off the main thread
func init() {
flag.BoolVar(&spaced, "spaced", false, "enable spacing")
flag.Parse()
go func() {
- tw := new(testwin)
+ tw = new(testwin)
done := make(chan struct{})
Do(func() { tw.make(done) })
<-done