Commit e9f49fc
authored
fix: do not import in close, we get called during garbage collection (#7)
I see in solara:
Exception ignored in: <function BaseComm.__del__ at 0x111534430>
Traceback (most recent call last):
File "/Users/maartenbreddels/github/3rd/comm/comm/base_comm.py", line 64, in __del__
File "/Users/maartenbreddels/github/3rd/comm/comm/base_comm.py", line 95, in close
ImportError: sys.meta_path is None, Python is likely shutting down
If instead, we call comm.get_comm_manager we still always
get the latest get_comm_manager, but do not do an import at during
garbage collection.1 parent 27d14fe commit e9f49fc
1 file changed
+3
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
67 | 68 | | |
68 | 69 | | |
69 | 70 | | |
70 | | - | |
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
| 74 | + | |
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
95 | | - | |
96 | 95 | | |
97 | 96 | | |
98 | 97 | | |
| |||
107 | 106 | | |
108 | 107 | | |
109 | 108 | | |
110 | | - | |
| 109 | + | |
111 | 110 | | |
112 | 111 | | |
113 | 112 | | |
| |||
0 commit comments