Skip to content

Instantly share code, notes, and snippets.


rolfbjarne/NSThreadExtensions.cs Secret

Last active Sep 29, 2015
What would you like to do?
using System;
using System.Runtime.InteropServices;
using ObjCRuntime;
static class NSThreadExtensions {
static extern void objc_msgSend (IntPtr receiver, IntPtr selector, double thread);
static extern double double_objc_msgSend (IntPtr receiver, IntPtr selector);>
public static void SetPriority (this NSThread thread, double priority)
objc_msgSend (thread.Handle, Selector.GetHandle ("setThreadPriority:"), priority);
public static double GetPriority (this NSThread thread)
return double_objc_msgSend (thread.Handle, Selector.GetHandle ("threadPriority"));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment