Skip to content

Instantly share code, notes, and snippets.

View aasimon's full-sized avatar

Bent Bisballe Nyeng aasimon

View GitHub Profile
deva ~ # /home/deva/src/mono/install/bin/mono thread-test.exe
Running threads..
GO!
Stop...
stopped
Run1: 2140
Run2: 432
Run3: 1442
Run4: 155
Run5: 154
using System;
using System.Threading;
class Foo {
static long Run_1 = 0;
static long Run_2 = 0;
static long Run_3 = 0;
static long Run_4 = 0;
static long Run_5 = 0;
static long Run_6 = 0;
@aasimon
aasimon / mono-3.2.8-thread_priority.patch
Created November 6, 2014 07:59
Patch for SetThreadPriority support in mono-3.2.8
diff --git a/mcs/class/corlib/System.Threading/Thread.cs b/mcs/class/corlib/System.Threading/Thread.cs
index 5af6800..112751d 100644
--- a/mcs/class/corlib/System.Threading/Thread.cs
+++ b/mcs/class/corlib/System.Threading/Thread.cs
@@ -98,13 +98,13 @@ namespace System.Threading {
private IntPtr android_tid;
private IntPtr thread_pinning_ref;
private int ignore_next_signal;
+ private int thread_priority;
/*