Skip to content

Use SharedResourcePointers for ZeroMQ contexts#278

Merged
aacuevas merged 1 commit intoopen-ephys:developmentfrom
tne-lab:shared-resource-zmq
Jan 6, 2019
Merged

Use SharedResourcePointers for ZeroMQ contexts#278
aacuevas merged 1 commit intoopen-ephys:developmentfrom
tne-lab:shared-resource-zmq

Conversation

@ethanbb
Copy link
Copy Markdown
Contributor

@ethanbb ethanbb commented Dec 22, 2018

I was just browsing the JUCE library and I realized that this SharedResourcePointer class does exactly what we want for the ZeroMQ context, i.e. share a single instance among all owners automatically and also destroy it automatically when all the pointers are gone. So using this, we don't have to awkwardly set/read the static bare pointer to keep all instances using the same context. Looks nicer and the intent is clearer.

  • As an aside, since these two plugins have a lot of duplicated functionality in their context and socket classes, maybe those should be pulled into a common library at some point.

  • Also fixes a minor issue with the network events restart connection button not always trying to reconnect to the currently bound port.

  • And yes I now have no life. Happy holidays everyone!

@aacuevas aacuevas merged commit 3fba6f4 into open-ephys:development Jan 6, 2019
@ethanbb ethanbb deleted the shared-resource-zmq branch January 7, 2019 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants