Well, I'm not sure if this is possible, but keep in mind that each Objective-C method has two implicit / hidden arguments, self and _cmd . Usually IMP typedef 'd:
typedef id (*IMP)(id,SEL,...);
If you want to use jerry-rig methods and selectors, you must have a method that looks like this:
void func (id self, SEL _cmd, void *firstParameter);
But even after that you need to register the name of the selector at runtime, then you need to associate this selector with this method, but this is done on a one-by-one basis (i.e. classes can have different implementations with the same selector name), therefore you at least need to have a dummy class.
It is much easier to just create a dummy class and a dummy instance of this class than call the API at runtime to get NSThread to call a single C function.
dreamlax
source share