Skip to content

Stop all processes in closeLocalNode. #187

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed

Stop all processes in closeLocalNode. #187

wants to merge 2 commits into from

Conversation

qnikst
Copy link
Contributor

@qnikst qnikst commented Mar 6, 2015

No description provided.

@qnikst
Copy link
Contributor Author

qnikst commented Mar 6, 2015

Still experience some deadlocks, I'll have to recheck.

@hyperthunk
Copy link
Member

Yes, just one exception please.

@qnikst
Copy link
Contributor Author

qnikst commented Mar 7, 2015

Ok, but there is a problem that process could recover from exception, however it should not recover from ProcessKilled one, and thus process could not terminate.

@qnikst
Copy link
Contributor Author

qnikst commented Mar 7, 2015

Updated, only one exception is sent to the process, also I left join trick in order to kill new processes that were spawned after call to closeLocalNode.

where
terminateProcesses :: IO (IO ())
terminateProcesses = do
st <- modifyMVar (localState node) (\st -> return (st, st))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or much more simply, just readMVar?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Taken from original code, I agree that it should be simplified.

@mboes
Copy link
Contributor

mboes commented Mar 7, 2015

This change would moreover warrant an accompanying test.

@qnikst
Copy link
Contributor Author

qnikst commented Mar 7, 2015

All tests are ready but I need to review them myself PR will be opened this night.

@qnikst
Copy link
Contributor Author

qnikst commented Mar 7, 2015

I have addressed all comments except request for additional test (as it will be done later and linked to this PR) and comment about potential loop.

@hyperthunk
Copy link
Member

Ok let me compare them two approaches now. Sorry for the delay!

@qnikst
Copy link
Contributor Author

qnikst commented Jun 16, 2015

Closing in favor of #188. Reason: another approach is simpler and give required guarantees, the only issue connected with n-t-backed implementation, and should not be workarounded on d-p level.

@qnikst qnikst closed this Jun 16, 2015
@qnikst qnikst deleted the termination branch June 17, 2015 13:37
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.

3 participants