messenger should use zmq syncronously and block#176
Closed
aebrahim wants to merge 2 commits intoarokem:masterfrom
aebrahim:zmq_sync
Closed
messenger should use zmq syncronously and block#176aebrahim wants to merge 2 commits intoarokem:masterfrom aebrahim:zmq_sync
aebrahim wants to merge 2 commits intoarokem:masterfrom
aebrahim:zmq_sync
Conversation
Now can autodetect MATLAB on unix, and fixes bugs with running on both unix/windows.
Contributor
Author
|
If this is an acceptable change I can also update the windows mex. |
Collaborator
|
The asynchronous api is needed to support the floating Matlab figures. I'd recommend a poller or adding a pause after the drawnow call. |
Contributor
Author
|
I just added a commit which uses the poll function every 20ms. |
By using the asynchronous API while listening constantly, excessive CPU usage occurs. Instead, this commit uses the synchronous version of zmq_recv, and uses zmq_poll with a timeout of 20ms to ensure the graphics are updated. This fixes #175.
Collaborator
|
We need the messenger file to support Octave, so no go on undocumented Matlab function. |
Contributor
Author
|
OK. I removed the ctrl c stuff and the undocumented function. |
Collaborator
|
LGTM, thanks @aebrahim. |
Contributor
Author
|
:) I made a second pull request (#178) which adds the compiled mex for windows/Linux |
Collaborator
|
Closed in favor of #178. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
By using the asyncronous API while listening, excessive CPU usage
occurs.
A longer-term workaround may be to use a poller with a reasonable
timeout (such as 20ms).
This fixes #175.