1

Closed

Plug needed. System.Void System.Threading.Monitor.Enter(System.Object)

description

System.Exception: Plug needed. System.Void System.Threading.Monitor.Enter(System.Object)
at Cosmos.IL2CPU.ILScanner.ScanMethod(MethodBase aMethod, Boolean aIsPlug)
at Cosmos.IL2CPU.ILScanner.ScanQueue()
at Cosmos.IL2CPU.ILScanner.Execute(MethodBase aStartMethod)
at Cosmos.Compiler.Builder.Builder.RunEngine(Object aParam)
Closed Jun 22, 2012 at 1:24 PM by kudzu
http://cosmos.codeplex.com/wikipage?title=Plugs&referringTitle=FAQ

comments

smremde wrote Aug 31, 2010 at 10:22 AM

Edited title.

smremde wrote Aug 31, 2010 at 10:23 AM

Are you using lock { } Or Monitor.Enter?

To solve it simply don't. We have no threading in COSMOS yet and this will plug not be implemented until then.

forest201 wrote Sep 1, 2010 at 8:54 PM

No I am not using lock{}.

I'm trying to Write a FileSystemEntry to Console using Console.WriteLine.

smremde wrote Sep 2, 2010 at 10:39 AM

Can you post some code? It would help if you could reduce your code to the bear minimum that can still replicate the error.

forest201 wrote Sep 3, 2010 at 2:51 PM

This is the code i have.

public static void Dir()
    {

       string[]  Dirs;
       int Length;
        string mdir = System.IO.Directory.GetCurrentDirectory();
        Console.Write("CurrentDir: ");
        Console.WriteLine(mdir);
        Dirs = System.IO.Directory.GetDirectories(mdir);
        Length = Dirs.Length;
        for (int x = 0; x<Length ; x++)
        {
            Console.WriteLine(Main.GetValue(x));
        }

    }

Trivalik wrote Apr 23, 2011 at 6:39 PM

I try to reproduce this, with your code. All IO function are unplugged!!! So is this example not useable.