Ejemplo n.º 1
0
    public void Check()
    {
        listdatatype m1 = new listdatatype(1, "Data~1");
        listdatatype m2 = new listdatatype(2, "Data~2");

        data.Add(m1);
        data.Add(m2);

        while (true)
        {
            if (data.Count>0)
            {
                Thread threadObj = new Thread(new ThreadStart(parsing));
                threadObj.Start();
                threadObj.Join();
            }
            if (false) // program terminates
                break;
        }
    }
Ejemplo n.º 2
0
    public void CheckList()
    {
        int[,] sample_values1={{1,2},{34,53},{25,63}};
        int[,] sample_values2 = { { 3, 13 }, { 10, 5 }, { 9, 28 } };
        listdatatype m1 = new listdatatype(sample_values1, "plot_command1");
        listdatatype m2 = new listdatatype(sample_values2, "plot_command2");

        list.Add(m1);
        list.Add(m2);

        while (true)
        {
            if (list.Count>0)
            {
                Thread threadObj = new Thread(new ThreadStart(parsing));
                threadObj.Start();
                threadObj.Join();
            }
            if (!Thread.CurrentThread.IsAlive ) // program terminates
                break;
        }
    }