Find Jobs
Hire Freelancers

Multithreading a windows application

$30-250 USD

In Progress
Posted over 11 years ago

$30-250 USD

Paid on delivery
This is my loop it calls GetFileVoters2012(Phone) that function needs to be multi-threaded. Your bid needs to included time test and confirm code. private void processVoter2012() { Int64 ID = 0; string Phone = ""; SqlConnection cn = new SqlConnection([login to view URL]); SqlCommand cmd = new SqlCommand("usp_SelectVoters2012PhoneNumbers", cn); [login to view URL] = [login to view URL]; [login to view URL]("@City", [login to view URL]); [login to view URL] = 0; [login to view URL](); SqlDataReader dr = [login to view URL](); while ([login to view URL]()) { Phone = [login to view URL]([login to view URL]("Phone")); // Thread t = new Thread(()=>GetFileVoters2012(Phone)); // Kick off a new thread // [login to view URL](); // [login to view URL](1000); GetFileVoters2012(Phone); } [login to view URL](); } public void GetFileVoters2012(string Phone) { string npa="",qnxx="",qstation=""; if ([login to view URL] == 7) Phone = "954" + Phone; if ([login to view URL] == 10) { npa = [login to view URL](0, 3); qnxx = [login to view URL](3, 3); qstation = [login to view URL](6, 4); string strURL = "[login to view URL]" + npa + "&qnxx=" + qnxx + "&qstation=" + qstation + "&focusfirst=1"; string Listofphone = "", phone = "", tst = "", PhoneType = ""; Int32 i = 0; double num; Boolean isNum; try { WebRequest myWebRequest = [login to view URL](strURL); WebResponse myWebResponse = [login to view URL](); Stream ReceiveStream = [login to view URL](); Encoding encode = [login to view URL]("utf-8"); StreamReader readStream = new StreamReader(ReceiveStream, encode); string strResponse; while ((strResponse = [login to view URL]()) != null && PhoneType=="") { /* StreamWriter oSw = new StreamWriter(strFilePath); [login to view URL](strResponse); [login to view URL](); [login to view URL](); */ i = [login to view URL]("Land Line"); if (i > 0) PhoneType = "L"; i = [login to view URL]("Cellular"); if (i > 0) PhoneType = "C"; i = [login to view URL]("Paging"); if (i > 0) PhoneType = "P"; } [login to view URL](); } catch { } [login to view URL] = Phone + "- " + PhoneType; [login to view URL](); SqlConnection conn = new SqlConnection([login to view URL]); SqlCommand cmd = new SqlCommand("usp_InsertVoters2012PhoneType", conn); [login to view URL] = [login to view URL]; //save ROS // [login to view URL]("@Phone", ID); [login to view URL]("@Phone", Phone); [login to view URL]("@PhoneType", PhoneType); [login to view URL](); [login to view URL](); [login to view URL](); } }
Project ID: 4068105

About the project

1 proposal
Remote project
Active 11 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
1 freelancer is bidding on average $55 USD for this job
User Avatar
I have experience with multi thread winform. I can help you. Regards
$55 USD in 1 day
5.0 (1 review)
1.0
1.0

About the client

Flag of UNITED STATES
Popano Beach, United States
4.9
3
Payment method verified
Member since May 13, 2012

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.