MCPcopy Index your code
hub / github.com/plotly/dash / get_callback_executor

Method get_callback_executor

dash/backends/base_server.py:194–209  ·  view source on GitHub ↗

Get or create the thread pool executor for callback execution. Args: max_workers: Maximum number of worker threads. If None, uses default. Returns: ThreadPoolExecutor instance for running callbacks.

(
        self, max_workers: int | None = None
    )

Source from the content-addressed store, hash-verified

192 self._callback_executor: ThreadPoolExecutor | None = None
193
194 def get_callback_executor(
195 self, max_workers: int | None = None
196 ) -> ThreadPoolExecutor:
197 """Get or create the thread pool executor for callback execution.
198
199 Args:
200 max_workers: Maximum number of worker threads. If None, uses default.
201
202 Returns:
203 ThreadPoolExecutor instance for running callbacks.
204 """
205 if self._callback_executor is None:
206 self._callback_executor = ThreadPoolExecutor(
207 max_workers=max_workers, thread_name_prefix="dash-callback-"
208 )
209 return self._callback_executor
210
211 def shutdown_executor(self, wait: bool = True) -> None:
212 """Shutdown the callback executor.

Callers 2

websocket_handlerMethod · 0.80
websocket_handlerMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected