Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

single threaded application into multithreaded application

Posted on 2002-04-14
3
Medium Priority
?
143 Views
Last Modified: 2013-11-20
i have a single threaded application(exe). Now i have to change it into multi threaded one. can any one suggest me how to migrate from single threaded to multi threaded application.
thanks in advance
ravi
0
Comment
Question by:ravikirang
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 32

Accepted Solution

by:
jhance earned 300 total points
ID: 6939924
Well, strictly speaking the answer to your question is to create a thread somewhere in your single-threaded application.  So a AfxBeginThread() might be a good place to start.

What is totally unclear from your question is WHY you want to do such a thing.  A serious answer can really only be given to a serious question.  As it is, your question is silly.  Saying "I have to changed it to multi-threaded" makes me believe that this is a HOMEWORK assignment and not real work.  If it were real work, you'd have some specific goal in mind for improving an existing single-threaded application by making it multi-threaded.  Multi-threading is not an end in itself.  It's a tool that can SOMETIMES be useful and powerful.  It can also be a detriment when used for the wrong reasons....

Frankly, I suspect you are a student and are asking this since it was assined in your class.  As such, you really should review the Experts Exchange policy regarding academics...
0
 
LVL 10

Expert Comment

by:makerp
ID: 6941284
void __cdecl my_great_thread(void *dummy)
{
  while(1)
  {
    MessageBox("void __cdecl my_great_thread(void *dummy) says hi there :)");
  }
}

place this in InitInstance

_beginthread(my_great_thread,0,NULL);

now you have a multi-threaded app
0
 

Author Comment

by:ravikirang
ID: 6944109
mr jhance, I'm very sorry for not clear in my question.
I'm new to ATL. I 'm working on developing loadtesting software. Here as a proof of concept i developed a single threaded application which captures dom events as well as user events. But i left with two challenges.

1 migrating my application into multi threaded one
2 capturing Alert boxes which are going to fired on browser(Security alerts in hotmail when ever user login into it).

As per your suggestion i'll try with afxbeginthread implementation. but please suggest me a better solution.

thanking you
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question