nv_dfm_core.session.callbacks_kind#

nv_dfm_core.session.callbacks_kind(default_callback=None, place_callbacks=None)[source]#

Determine whether all callbacks are sync, all are async, or none provided.

Parameters:
  • default_callback (DfmDataCallback | None) – The default callback for unspecified places.

  • place_callbacks (dict[str, DfmDataCallback] | None) – Dictionary mapping place names to callbacks.

Returns:

‘sync’ if all callbacks are synchronous. ‘async’ if all callbacks are asynchronous. ‘none’ if no callbacks are provided.

Raises:

ValueError – If callbacks are mixed (some sync, some async).

Return type:

Literal[‘sync’, ‘async’, ‘none’]