Switch to using SystemDSContext as a ContextManager instead of purely automatic startup and manual shutdown. This makes performance impact more obvious for the user because the expensive startup of a java process happens during SystemDSContext creation and allows for us to ensure the closing of the py4j connection and shutdown of subprocess if the user decides to use with SystemDSContext() as sds:. Manual shutdown with .close() is also possible for cases where the user wants to keep the SystemDSContext around longer, for example as an member variable of his class.
Switch to using
SystemDSContext
as aContextManager
instead of purely automatic startup and manual shutdown. This makes performance impact more obvious for the user because the expensive startup of a java process happens duringSystemDSContext
creation and allows for us to ensure the closing of the py4j connection and shutdown of subprocess if the user decides to usewith SystemDSContext() as sds:
. Manual shutdown with.close()
is also possible for cases where the user wants to keep theSystemDSContext
around longer, for example as an member variable of his class.