.assembly extern mscorlib { .ver 2:0:0:0 .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. } .assembly 'test2' { .custom instance void class [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx 63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows. .hash algorithm 0x00008004 .ver 0:0:0:0 } .module test2.exe // GUID = {FFF0019E-1715-484A-939A-B0BE31F7A1FC} .class private auto ansi beforefieldinit Capsule extends [mscorlib]System.Object { .field public bool newlinef .field public int32 foo // method line 1 .method public hidebysig specialname rtspecialname instance default void .ctor (int32 myval) cil managed { // Method begins at RVA 0x20ec // Code size 21 (0x15) .maxstack 8 IL_0000: ldarg.0 IL_0001: call instance void object::.ctor() IL_0006: ldarg.0 IL_0007: ldarg.1 IL_0008: stfld int32 Capsule::foo IL_000d: ldarg.0 IL_000e: ldc.i4.0 IL_000f: stfld bool Capsule::newlinef IL_0014: ret } // end of method Capsule::instance default void .ctor (int32 myval) } // end of class Capsule .class private auto ansi beforefieldinit Kiwi extends [mscorlib]System.Object { // method line 2 .method public hidebysig specialname rtspecialname instance default void .ctor () cil managed { // Method begins at RVA 0x2104 // Code size 7 (0x7) .maxstack 8 IL_0000: ldarg.0 IL_0001: call instance void object::.ctor() IL_0006: ret } // end of method Kiwi::instance default void .ctor () .class nested public auto ansi beforefieldinit channel`1 extends [mscorlib]System.Object { .field private !0 datum .field private bool empty // method line 3 .method public hidebysig specialname rtspecialname instance default void .ctor () cil managed { // Method begins at RVA 0x210c // Code size 14 (0xe) .maxstack 8 IL_0000: ldarg.0 IL_0001: ldc.i4.1 IL_0002: stfld bool class Kiwi/channel`1::empty IL_0007: ldarg.0 IL_0008: call instance void object::.ctor() IL_000d: ret } // end of method channel`1::instance default void .ctor () // method line 4 .method public hidebysig instance default void write (!T v) cil managed { // Method begins at RVA 0x211c // Code size 64 (0x40) .maxstack 5 .locals init ( class Kiwi/channel`1 V_0) IL_0000: ldarg.0 IL_0001: stloc.0 IL_0002: ldloc.0 IL_0003: call void class [mscorlib]System.Threading.Monitor::Enter(object) .try { // 0 IL_0008: br IL_0014 IL_000d: ldarg.0 IL_000e: call bool class [mscorlib]System.Threading.Monitor::Wait(object) IL_0013: pop IL_0014: ldarg.0 IL_0015: ldfld bool class Kiwi/channel`1::empty IL_001a: brfalse IL_000d IL_001f: ldarg.0 IL_0020: ldarg.1 IL_0021: stfld !0 class Kiwi/channel`1::datum IL_0026: ldarg.0 IL_0027: ldc.i4.0 IL_0028: stfld bool class Kiwi/channel`1::empty IL_002d: ldarg.0 IL_002e: call void class [mscorlib]System.Threading.Monitor::Pulse(object) IL_0033: leave IL_003f } // end .try 0 finally { // 0 IL_0038: ldloc.0 IL_0039: call void class [mscorlib]System.Threading.Monitor::Exit(object) IL_003e: endfinally } // end handler 0 IL_003f: ret } // end of method channel`1::instance default void write (!T v) // method line 5 .method public hidebysig instance default !T read () cil managed { // Method begins at RVA 0x2184 // Code size 67 (0x43) .maxstack 6 .locals init ( !T V_0, class Kiwi/channel`1 V_1, !T V_2) IL_0000: ldarg.0 IL_0001: stloc.1 IL_0002: ldloc.1 IL_0003: call void class [mscorlib]System.Threading.Monitor::Enter(object) .try { // 0 IL_0008: br IL_0014 IL_000d: ldarg.0 IL_000e: call bool class [mscorlib]System.Threading.Monitor::Wait(object) IL_0013: pop IL_0014: ldarg.0 IL_0015: ldfld bool class Kiwi/channel`1::empty IL_001a: brtrue IL_000d IL_001f: ldarg.0 IL_0020: ldc.i4.1 IL_0021: stfld bool class Kiwi/channel`1::empty IL_0026: ldarg.0 IL_0027: ldfld !0 class Kiwi/channel`1::datum IL_002c: stloc.0 IL_002d: ldarg.0 IL_002e: call void class [mscorlib]System.Threading.Monitor::Pulse(object) IL_0033: leave IL_003f } // end .try 0 finally { // 0 IL_0038: ldloc.1 IL_0039: call void class [mscorlib]System.Threading.Monitor::Exit(object) IL_003e: endfinally } // end handler 0 IL_003f: ldloc.0 IL_0040: ret // IL_0041: ldloc.2 // IL_0042: ret } // end of method channel`1::instance default !T read () } // end of class channel`1 } // end of class Kiwi .class private auto ansi beforefieldinit ConsumerClass extends [mscorlib]System.Object { .field private class Kiwi/channel`1 x // method line 6 .method public hidebysig specialname rtspecialname instance default void .ctor (class Kiwi/channel`1 c) cil managed { // Method begins at RVA 0x21f0 // Code size 14 (0xe) .maxstack 8 IL_0000: ldarg.0 IL_0001: call instance void object::.ctor() IL_0006: ldarg.0 IL_0007: ldarg.1 IL_0008: stfld class Kiwi/channel`1 ConsumerClass::x IL_000d: ret } // end of method ConsumerClass::instance default void .ctor (class Kiwi/channel`1 c) // method line 7 .method public hidebysig instance default void process () cil managed { // Method begins at RVA 0x2200 // Code size 59 (0x3b) .maxstack 5 .locals init ( class Capsule V_0) IL_0000: ldarg.0 IL_0001: ldfld class Kiwi/channel`1 ConsumerClass::x IL_0006: callvirt instance !0 class Kiwi/channel`1::read() IL_000b: stloc.0 IL_000c: ldstr "{0} " IL_0011: ldloc.0 IL_0012: ldfld int32 Capsule::foo IL_0017: box [mscorlib]System.Int32 IL_001c: call void class [mscorlib]System.Console::Write(string, object) IL_0021: ldloc.0 IL_0022: ldfld bool Capsule::newlinef IL_0027: brfalse IL_0036 IL_002c: ldstr "" IL_0031: call void class [mscorlib]System.Console::WriteLine(string) IL_0036: br IL_0000 } // end of method ConsumerClass::instance default void process () } // end of class ConsumerClass .class private auto ansi beforefieldinit test2 extends [mscorlib]System.Object { .field private static int32 limit .field private static class Capsule cap // method line 8 .method public hidebysig specialname rtspecialname instance default void .ctor () cil managed { // Method begins at RVA 0x2248 // Code size 7 (0x7) .maxstack 8 IL_0000: ldarg.0 IL_0001: call instance void object::.ctor() IL_0006: ret } // end of method test2::instance default void .ctor () // method line 9 .method private static specialname rtspecialname default void .cctor () cil managed { // Method begins at RVA 0x2250 // Code size 19 (0x13) .maxstack 8 IL_0000: ldc.i4.5 IL_0001: stsfld int32 test2::limit IL_0006: ldc.i4.s 0x17 IL_0008: newobj instance void class Capsule::.ctor(int32) IL_000d: stsfld class Capsule test2::cap IL_0012: ret } // end of method test2::default void .cctor () // method line 10 .method public static hidebysig default void Main () cil managed { // Method begins at RVA 0x2264 .entrypoint // Code size 153 (0x99) .maxstack 9 .locals init ( int32 V_0, int32 V_1, class Kiwi/channel`1 V_2, class ConsumerClass V_3, class [mscorlib]System.Threading.Thread V_4) IL_0000: newobj instance void class Kiwi/channel`1::.ctor() IL_0005: stloc.2 IL_0006: ldloc.2 IL_0007: newobj instance void class ConsumerClass::.ctor(class Kiwi/channel`1) IL_000c: stloc.3 IL_000d: ldloc.3 IL_000e: ldftn instance void class ConsumerClass::process() IL_0014: newobj instance void class [mscorlib]System.Threading.ThreadStart::.ctor(object, native int) IL_0019: newobj instance void class [mscorlib]System.Threading.Thread::.ctor(class [mscorlib]System.Threading.ThreadStart) IL_001e: stloc.s 4 IL_0020: ldloc.s 4 IL_0022: callvirt instance void class [mscorlib]System.Threading.Thread::Start() IL_0027: ldstr "Times Table Up To " IL_002c: ldsfld int32 test2::limit IL_0031: box [mscorlib]System.Int32 IL_0036: call string string::Concat(object, object) IL_003b: call void class [mscorlib]System.Console::WriteLine(string) IL_0040: ldc.i4.1 IL_0041: stloc.0 IL_0042: br IL_008d IL_0047: ldc.i4.1 IL_0048: stloc.1 IL_0049: br IL_007e IL_004e: ldsfld class Capsule test2::cap IL_0053: ldloc.0 IL_0054: ldloc.1 IL_0055: mul IL_0056: stfld int32 Capsule::foo IL_005b: ldsfld class Capsule test2::cap IL_0060: ldloc.1 IL_0061: ldsfld int32 test2::limit IL_0066: ldc.i4.1 IL_0067: sub IL_0068: ceq IL_006a: stfld bool Capsule::newlinef IL_006f: ldloc.2 IL_0070: ldsfld class Capsule test2::cap IL_0075: callvirt instance void class Kiwi/channel`1::write(!0) IL_007a: ldloc.1 IL_007b: ldc.i4.1 IL_007c: add IL_007d: stloc.1 IL_007e: ldloc.1 IL_007f: ldsfld int32 test2::limit IL_0084: ble IL_004e IL_0089: ldloc.0 IL_008a: ldc.i4.1 IL_008b: add IL_008c: stloc.0 IL_008d: ldloc.0 IL_008e: ldsfld int32 test2::limit IL_0093: ble IL_0047 IL_0098: ret } // end of method test2::default void Main () } // end of class test2