Skip to content

Conversation

@rahulraghu94
Copy link
Contributor

New helper function to help stop Asynchronous server are being added.
Calling this helper function will kill the main thread

Calling this helper function will kill the main thread
@rahulraghu94 rahulraghu94 changed the base branch from test-dev to dev November 24, 2017 11:24
@rahulraghu94 rahulraghu94 self-assigned this Nov 24, 2017
@rahulraghu94
Copy link
Contributor Author

@dhoomakethu , changed the base to dev

reactor.stop()
else:
reactor.callFromThread(reactor.stop)
_logger.debug("Stopping main thread")
Copy link
Contributor

Choose a reason for hiding this comment

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

@rahulraghu94 This log message will be displayed irrespective of whether the current thread is main or child.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Isn't that expected behaviour?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh, sorry. I'm on some meds 📦
Fixing...

reactor.run()


def _stop_server(is_mainthread=True):
Copy link
Contributor

Choose a reason for hiding this comment

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

THe param is_mainthread=True is not being used, remove it if unnecessary

@dhoomakethu dhoomakethu merged commit b1b9e4f into dev Nov 25, 2017
@dhoomakethu dhoomakethu deleted the #84-stop-async-server branch November 28, 2017 03:32
wexi pushed a commit to wexi/pymodbus that referenced this pull request Dec 1, 2017
* New helper function to help stop Asynchronous server are being added.
Calling this helper function will kill the main thread

* pymodbus-dev#84: Removing redundant parameters to method _is_main_thread

* pymodbus-dev#84: Fixed loggers

* pymodbus-dev#84: Retaining one generic StopServer command that will cater to both TCP and Seriel Server

* pymodbus-dev#84 Add docuementation to StopServer helper function
dhoomakethu pushed a commit that referenced this pull request Dec 21, 2017
* New helper function to help stop Asynchronous server are being added.
Calling this helper function will kill the main thread

* #84: Removing redundant parameters to method _is_main_thread

* #84: Fixed loggers

* #84: Retaining one generic StopServer command that will cater to both TCP and Seriel Server

* #84 Add docuementation to StopServer helper function
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants