Poll - Are you doing Multithreaded application development?
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

View Poll Results: Are you building multithreaded applications?

Voters
34. You may not vote on this poll
  • Yes, I am building multi-threaded applications and have been for over a year

    25 73.53%
  • Yes, have recently started building multithreaded applications (< 1 a year)

    1 2.94%
  • I'm only playing around with it - nothing real

    4 11.76%
  • No, but expect to be doing so very soon

    2 5.88%
  • No, and am not sure when I will be

    1 2.94%
  • No, and never plan to

    1 2.94%
Results 1 to 12 of 12

Thread: Poll - Are you doing Multithreaded application development?

  1. #1
    Join Date
    Sep 2000
    Location
    Indianapolis
    Posts
    6,433

    Poll - Are you doing Multithreaded application development?

    To get things started, I thought I'd toss out a poll for people to answer.

    If you answer yes in the poll, I'd be interested in hearing what types of things you are threading or running in parallel. I know that the obvious answers are things such as grpahics processing; however, I've heard a few great examples of other things that are being parallized such as virus checking.

    Brad!
    -----------------------------------------------
    Brad! Jones, CodeGuru.com Site Director
    Developer.com Network Director / EiC

    webmaster@codeguru.com
    (My Latest Book)


    -----------------------------------------------
    Share on Google+

  2. #2
    Join Date
    Apr 2010
    Location
    Dayton, OH
    Posts
    16

    Re: Poll - Are you doing Multithreaded application development?

    Currently I'm designing and prototyping an integration application that routes messages between other applications. In addition to transferring messages between applications, it can perform processing tasks to retrieve, set, or generate information and transform messages from one type to another.

    At its core, the application is multi-threaded so that it can process multiple messages simultaneously. Although it won't be used initially, the design also allows the same message to be run through multiple, independent, processes simultaneously.
    Share on Google+

  3. #3
    Lindley is offline Elite Member Power Poster
    Join Date
    Oct 2007
    Location
    Fairfax, VA
    Posts
    10,891

    Re: Poll - Are you doing Multithreaded application development?

    I wrote a thread pool class some time back to support mathematically intensive computations. It uses pthreads internally, but tasks can be queued using either an interface resembling pthreads or one resembling Boost threads.

    The hard part of the design was figuring out how to support a thread pool task creating *another* thread pool task, and subsequently waiting for it to complete. We don't want that thread to sit idle just because the task is in a waiting state.

    What I ended up doing was using thread-local storage to give each task a priority, and incrementing to higher priority each time a task spawned another task. Then, when a task stopped to wait for another task to complete, any task with at least as high a priority was allowed to take over the thread and run to completion. Then we'd check whether or not the waited-for task was done, and if so return the thread to the waiting task.

    This worked well for the case when I needed to evaluate many nodes in a tree independently, and the computations of each node were themselves highly parallelizable. I could spawn each node as a task and have them in turn spawn sub-tasks, and everything worked seamlessly through a very simple interface.

    I considered enforcing a stricter requirement that a given task could only have its thread borrowed by its own child tasks, but this would have been more complex to design, and there appeared to be no need for it in practice.
    Last edited by Lindley; April 16th, 2010 at 04:53 PM.
    Share on Google+

  4. #4
    Join Date
    Mar 2006
    Posts
    142

    Re: Poll - Are you doing Multithreaded application development?

    I developed code to process the 2-dimensional outline of a transitional feature on a natural object in a fast-paced industrial environment. Although the algorithm to do this is quite straightforward, making it multi-threaded was significantly more difficult because certain inflections in the outline imply an order in which the outline must be processed. I solved the problem with a carefully-crafted binary tree which is able to direct threads in a worker queue to specific parts of the outline in the correct order.

    The result of that process can loosely be thought of as a "map" upon which a combinatorial algorithm must operate. I developed code to permute carefully ordered sets in the map and pass the permutations to worker threads, which must in turn communicate a job status amongst each other so they can rapidly shut down when the algorithm is complete, in order to turn the CPU back over to other parts of the application (as the functionality I implemented is only a part of a larger computationally-intensive process, the whole of which must be fast).
    Share on Google+

  5. #5
    Join Date
    Nov 2003
    Location
    Belgium
    Posts
    8,062

    Re: Poll - Are you doing Multithreaded application development?

    I have used multithreading for a long time, going back to Windows 95 even.
    Mostly I use it to keep the UI responsive will compute intensive tasks are being done in separate worker threads. What I did in threads is things like image processing, thumbnail generation, web services to handle requests in different threads, 2G/3G software running at operators datacenters to enable internet and MMS on cellphones and so on.
    Share on Google+

  6. #6
    Join Date
    Apr 2010
    Posts
    1

    Re: Poll - Are you doing Multithreaded application development?

    i am working in stock market applications. we have a net work library based on IOCompletion port. The library is working fine with real time huge data, however the organization has a plan to upgrade its library. I want to know which technology should we use to improve performance and reliability.
    Share on Google+

  7. #7
    Join Date
    Jan 2006
    Location
    Chicago, IL
    Posts
    14,991

    Re: Poll - Are you doing Multithreaded application development?

    I used VB6 to create two programs, to simulate parallel processing.

    The app would search each letter of the alphabet for the last name, and each of the letters of the first name.

    Prog#1 spun up 26 instances of Prog#2, and they all ran at the same time.

    It would have been nice to be able to have Prog#2 run in parallel, which should be possible, now.

    EDIT: Also had an experience with Powershell 2.0. I had a loop routine that dialed a modem, and PS decided to execute them in parallel. Had to find the /s flag
    Last edited by dglienna; April 19th, 2010 at 08:15 AM.
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!
    Share on Google+

  8. #8
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Wallisellen (ZH), Switzerland
    Posts
    17,482

    Re: Poll - Are you doing Multithreaded application development?

    I use multithreading but only when I really need it:
    • to work with serial ports
    • to support waitable timers
    • to implement socket (and other types of IPC) communications
    • and so on
    Victor Nijegorodov
    Share on Google+

  9. #9
    Join Date
    Apr 2010
    Posts
    1

    Re: Poll - Are you doing Multithreaded application development?

    I always run game loops in a separate thread or separate threads.
    Share on Google+

  10. #10
    Join Date
    Mar 2004
    Posts
    1

    Re: Poll - Are you doing Multithreaded application development?

    I have been writing threaded applications for a long time. My current project is an app for switch programming. It reads a script file and writes to the switch, all done in a seperate thread.

    Bob
    Share on Google+

  11. #11
    Join Date
    May 2002
    Posts
    6

    Re: Poll - Are you doing Multithreaded application development?

    I have been writing multi thread program in verious way. For machine interface, I have used visual C. On linux, I made delay process for Order-claim system calld "Margine Manager". Now I am making "Queue Manager" C# multi thread.
    Last edited by kyewooklee; April 20th, 2010 at 07:07 AM.
    Share on Google+

  12. #12
    Join Date
    Jul 2002
    Location
    Portsmouth. United Kingdom
    Posts
    2,725

    Re: Poll - Are you doing Multithreaded application development?

    Our applications monitor and take images from items on a high speed conveyor.
    There are usually four or five threads.


    1. System thread (Highest priority)
      Handles 1ms timer.
      Tracks items on the conveyor.
      Coordinates activities of the other worker threads.
    2. Acquire thread
      Handles acquisition of images
    3. Analysis thread (one or more)
      Analyses the images, may be one thread for each core/image.
    4. GUI thread (Lowest priority)
    "It doesn't matter how beautiful your theory is, it doesn't matter how smart you are. If it doesn't agree with experiment, it's wrong."
    Richard P. Feynman
    Share on Google+

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center