Which to use

Method Signature: Both methods use the same function signature, taking parameters metaclass, subclass_key, call_function, call_args, return_function, and ret_args.

Shared implementation: Beyond resolving their target, both handlers run the same codeMainController._dispatch_to — so their guards, their argument rules, their return-value handling and their log messages are identical by construction and cannot drift apart. The two were previously copies of one another and had already diverged in their error handling.

Error Handling: The shared body checks that call_function exists and is callable, then checks that call_args will bind to its signature before calling it. A call that cannot bind is reported and never attempted; the target is called at most once; a TypeError raised inside the target is reported as such, with a traceback, rather than being mistaken for an argument mismatch.

Return Function Execution: Both execute a return_function with the result of call_function followed by ret_args. Whether the result is spread across the callback’s parameters or passed as a single argument is decided by the target’s declared return type — see the Global Signal API overview.