Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ACS
Public
Power System Simulation and Optimization
DPsim
DPsim
Commits
548bbd93
Commit
548bbd93
authored
Jul 15, 2019
by
Steffen Vogel
🎅🏼
Browse files
python: keep event channel open until simulation object is released
Former-commit-id:
a5281d31
parent
2d4f56a9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Source/Python/dpsim/Simulation.py
View file @
548bbd93
...
...
@@ -60,6 +60,10 @@ class Simulation(_dpsim.Simulation):
if
pbar
:
self
.
show_progressbar
()
def
__del__
(
self
):
self
.
remove_eventfd
(
self
.
_event_socks
[
0
].
fileno
())
self
.
_events
.
close
()
def
add_callback
(
self
,
cb
,
*
args
,
event
=
None
):
self
.
_events
.
add_callback
(
cb
,
*
args
,
event
=
event
)
...
...
@@ -79,9 +83,9 @@ class Simulation(_dpsim.Simulation):
if
self
.
_pbar_tui
:
self
.
_pbar_tui
.
finish
()
self
.
_pbar_task
.
cancel
()
self
.
remove_eventfd
(
self
.
_event_socks
[
0
].
fileno
()
)
self
.
_events
.
close
()
if
self
.
_pbar_task
:
self
.
_pbar_task
.
cancel
()
LOGGER
.
info
(
'Finished simulation!'
)
def
overrun
(
self
,
*
args
):
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment