Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Add explicit close+fix panics #12
In the meantime, it looks like you have a data race https://travis-ci.org/zenhack/go.notmuch/jobs/84025268#L600
The race condition is actually a higher-level problem than just a non-atomic memory read. The failure case is this:
I think we'd actually have to use a sync.RWMutex; the dependency graph isn't even a tree (though it is a DAG, thank god) so trying to use plain old locks would be really messy. It should work to do the following in Close():
I've got some other stuff I need to work on today. If I don't hear back from with you with better ideas (which I unfortunately don't have) and/or problems I'll go ahead with that.