We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c0a67e4 commit f712734Copy full SHA for f712734
jupyter_server/services/nbconvert/handlers.py
@@ -1,11 +1,14 @@
1
import json
2
+import asyncio
3
4
from anyio.to_thread import run_sync
5
from tornado import web
6
7
from ...base.handlers import APIHandler
8
9
10
+LOCK = asyncio.Lock()
11
+
12
class NbconvertRootHandler(APIHandler):
13
14
@web.authenticated
@@ -20,7 +23,8 @@ async def get(self):
20
23
exporters = await run_sync(base.get_export_names)
21
24
for exporter_name in exporters:
22
25
try:
- exporter_class = await run_sync(base.get_exporter, exporter_name)
26
+ async with LOCK:
27
+ exporter_class = await run_sync(base.get_exporter, exporter_name)
28
except ValueError:
29
# I think the only way this will happen is if the entrypoint
30
# is uninstalled while this method is running
0 commit comments