Commit 1a3e1b8
authored
Fix duplicate call of extension "init_cell"
There exists a possibility of calling function `run_init_cells()` twice on function `run_init_cells_asap()`.
Kernel exists only as two cases: (1) Kernel is already ready, and (2) Kernel is not yet ready, and in both cases, `run_init_cells()` should be called only once.
On case (1), there is no need to hook an event on `kernel_ready`, as cells are already initialized.
If the event hook exists, in some specific cases, `run_init_cells()` is called twice, due to racing conditions.1 parent b767c69 commit 1a3e1b8
File tree
1 file changed
+4
-2
lines changed- src/jupyter_contrib_nbextensions/nbextensions/init_cell
1 file changed
+4
-2
lines changedLines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
147 | 147 | | |
148 | 148 | | |
149 | 149 | | |
150 | | - | |
151 | | - | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
152 | 154 | | |
153 | 155 | | |
154 | 156 | | |
| |||
0 commit comments