Quantcast
Channel: LoadRunner Practitioners Forum topics
Viewing all articles
Browse latest Browse all 3978

SOS: Cannot create thead in lr script with .Net

$
0
0

need your help:  is lr  support to create thead in .net script?

 

backgroup:

just want to create a thread to do something wiht C# in lr script, but created thread cannot been called,

detail as following:

public int Action()
    {
        lr.output_message("Action thread start...");
        Thread t = new Thread(new ThreadStart(ThreadProc));
        t.Start();
        while (true)
        {
            Thread.Sleep(1000);
            lr.output_message("action thread is running...");
        }
        return 0;

    }
    public void ThreadProc()
    {
        lr.oupt_message("thread proc is ready ...");
        while (true)
        {
            lr.out_message("proc is running");
            Thread.Sleep(1000);
        }
    }

 

ouput:

Action thread start...
action thread is running...
action thread is running...
action thread is running...

 

 


Viewing all articles
Browse latest Browse all 3978

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>