Comments (1)
I may have figured out what was causing this. It looks like Panel is holding onto Panel resources even after the Python interpreter exits. Maybe a leak of some kind?
Anyways, I found that running pn.state.kill_all_servers()
as the last line in main.py eliminates all of the problems here. I also moved all of the variables to a def main
function so that there are zero global variables other than the app object. The weird thing with this is I am stopping the server. It shouldn't be running, unless the state is still left behind?
Why doesn't panel automatically do this clean up operation when Python exits? It's probably a good idea.
def main(app):
# Pybinding object.
launcher = AppLauncher(app)
launcher.run()
if __name__ == "__main__":
print("Creating C++ application")
app = cpp_app_test.Application()
print("C++ application created.")
main(app)
print("Exiting interpreter. Destructors should be called after this point!")
pn.state.kill_all_servers()
produces the output:
Creating C++ application
Constructed application.
C++ application created.
Launching server at http://0.0.0.0:5000
^CCaught signal 2, shutting down...
Delete main page
Exiting interpreter. Destructors should be called after this point!
Delete home page
Destroyed application
I've noticed that the full application which contains a Sidebar and a Controller still doesn't work though. I may just reduce the number of references to self_app
to fix this.
from panel.
Related Issues (20)
- Limit Swipe to avoid hiding certain regions
- Links in tutorial pages are broken
- Font size HOT 3
- Feature Request: CalendarMonthWidget HOT 1
- ChatFeed documentation wrong in regards of ChatFeed/ChatInterface 'callback_avatar' and ChatMessage 'value' HOT 2
- TextInput does not stretch_width in a Card header HOT 4
- value_throttled isn't throttled for FloatSlider when using keyboard arrows HOT 4
- `ChatInterface.stream` overwrites prior message's user name
- PYTHONPATH first element not used in jupyter preview HOT 1
- Can set FloatSlider values beyond start/end
- Streaming rows of markdown into a ChatFeed, Feed, or Column breaks the styling of subsequent appended rows and leads to overlap of text HOT 5
- Inconsistent Button/FileDownload Icon location HOT 1
- pn.state.cookies not populated via panel convert files
- Styler object has no attribute 'map' HOT 5
- Make it possible and easy to pyscript editor with Panel HOT 4
- PyScript reference example no longer working HOT 13
- ValueError when using inclusive_bounds HOT 1
- Tabulator not handling SelectionEvent and CellClickEvent correctly when header filtering is applied. HOT 9
- Built-in support to open/close template sidebar HOT 1
- LaTeX reference example not rendering correctly
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from panel.