Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. background worker

background worker

Scheduled Pinned Locked Moved C / C++ / MFC
csharpc++tutorialquestion
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Adnan Merter
    wrote on last edited by
    #1

    i need to create a function that can stop a process which takes long time. i mean the user can stop the process while it is processing(just like a cancel buton). can i do this by using "backgroung worker"? i found some example code and information in C# but i couldnt in C++. do i have to use multithreading?

    C L 2 Replies Last reply
    0
    • A Adnan Merter

      i need to create a function that can stop a process which takes long time. i mean the user can stop the process while it is processing(just like a cancel buton). can i do this by using "backgroung worker"? i found some example code and information in C# but i couldnt in C++. do i have to use multithreading?

      C Offline
      C Offline
      Chris Losinger
      wrote on last edited by
      #2

      strictly speaking you don't have to. but the alternatives can be pretty ugly, and even more trouble than using a worker thread. use a worker thread.

      image processing toolkits | batch image processing

      1 Reply Last reply
      0
      • A Adnan Merter

        i need to create a function that can stop a process which takes long time. i mean the user can stop the process while it is processing(just like a cancel buton). can i do this by using "backgroung worker"? i found some example code and information in C# but i couldnt in C++. do i have to use multithreading?

        L Offline
        L Offline
        led mike
        wrote on last edited by
        #3

        Well unless your code is doing the processing you can't stop it without terminating the worker thread waiting on the process, which is not recommended.

        led mike

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups