def getThreadPolicy(getDefault, flavour):
 if importCtypesFailed:
  return False
 extendedPolicy = _timeConstraintThreadPolicy()
 getDefault = ctypes.c_int(getDefault)
 err = cocoa.thread_policy_get(cocoa.mach_thread_self(), THREAD_TIME_CONSTRAINT_POLICY, ctypes.byref(extendedPolicy), ctypes.byref(THREAD_TIME_CONSTRAINT_POLICY_COUNT), ctypes.byref(getDefault))
 return extendedPolicy

def getThreadPolicy ( getDefault , flavour ) : if importCtypesFailed : return False extendedPolicy = _timeConstraintThreadPolicy ( ) getDefault = ctypes . c_int ( getDefault ) err = cocoa . thread_policy_get ( cocoa . mach_thread_self ( ) , THREAD_TIME_CONSTRAINT_POLICY , ctypes . byref ( extendedPolicy ) , ctypes . byref ( THREAD_TIME_CONSTRAINT_POLICY_COUNT ) , ctypes . byref ( getDefault ) ) return extendedPolicy
retrieve the current thread policy .