Multithread Linked List in C++

Completed Posted Mar 12, 2007 Paid on delivery
Completed Paid on delivery

I have a linked list of N circles that traverse looking for which circles overlap.

I need this traversal **thread safe and multithreaded**. The solution should be able to handle any number of threads.

This will require adding some access locks to the circle class.

There are other ways to solve this problem but right now I am working on the Multithreaded aspects.

Attached is a non threaded demo.

The major function:

int nloop = System::Int32::Parse(this->tbNloops->Text);

for (int j = 0; j<nloop; j++) {

Circle *start, *loop;

int N = 0;

start = circlelist;

while (start != NULL) {

loop = start->next;

while (loop != NULL) {

double distance = System::Math::Sqrt((start->x-loop->x)*(start->x-loop->x) + (start->y-loop->y)*(start->y-loop->y));

if (distance < (start->r + loop->r)) {

start->count++; // Here I write to the circles - need to make sure other

loop->count++; // threads are not writing at the same time

N++;

}

loop = loop->next;

}

start = start->next;

}

}

## Deliverables

1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done.

2) Deliverables must be in ready-to-run condition, as follows (depending on the nature of the deliverables):

3) All deliverables will be considered "work made for hire" under U.S. Copyright law. Buyer will receive exclusive and complete copyrights to all work purchased. (No GPL, GNU, 3rd party components, etc. unless all copyright ramifications are explained AND AGREED TO by the buyer on the site per the coder's Seller Legal Agreement).

## Platform

C++

Miscrosoft Visual Studio 2005

.NET 2.0

C Programming Engineering MySQL PHP Software Architecture Software Testing

Project ID: #2878710

About the project

5 proposals Remote project Active Mar 13, 2007

Awarded to:

yilin

See private message.

$34 USD in 4 days
(69 Reviews)
5.7

5 freelancers are bidding on average $75 for this job

MuktoSoftware

See private message.

$59.5 USD in 4 days
(449 Reviews)
7.5
neatcodersl

See private message.

$85 USD in 4 days
(32 Reviews)
4.9
fawkesvw

See private message.

$68 USD in 4 days
(20 Reviews)
4.9
bharatsoftvw

See private message.

$127.5 USD in 4 days
(2 Reviews)
1.5