MCPcopy Create free account
hub / github.com/ipython/ipython / stop

Method stop

IPython/core/history.py:839–847  ·  view source on GitHub ↗

This can be called from the main thread to safely stop this thread. Note that it does not attempt to write out remaining history before exiting. That should be done by calling the HistoryManager's end_session method.

(self)

Source from the content-addressed store, hash-verified

837 "History will not be written to the database.") % repr(e))
838
839 def stop(self):
840 """This can be called from the main thread to safely stop this thread.
841
842 Note that it does not attempt to write out remaining history before
843 exiting. That should be done by calling the HistoryManager's
844 end_session method."""
845 self.stop_now = True
846 self.history_manager.save_flag.set()
847 self.join()
848
849
850# To match, e.g. ~5/8-~2/3

Callers 5

mainloopMethod · 0.80
stopFunction · 0.80
inputhookFunction · 0.80
test_historyFunction · 0.80
inputhook_qt4Function · 0.80

Calls 1

setMethod · 0.80

Tested by 1

test_historyFunction · 0.64