|Home > Using the CADI Interface Methods from a Debugger > CADI accesses from a debugger > CADI and threads|
Debugging a simulation model that exposes a CADI implementation typically uses one simulation thread and one (debugger) thread for each connected debugger.
To decouple the threads (especially the debugger threads from the simulation thread) and avoid deadlocks, you must obey these rules when implementing the interface:
CADIProfilingmust only be called from a debugger thread.
CADICallbackObjmust only be called from the simulation thread.
This implicitly means that: