Login Register






Don't use threads, use tasks instead. filter_list
Author
Message
RE: Don't use threads, use tasks instead. #2
As much as I'd love to just take your word for task's being better, do you have any actual evidence to back it up? How are tasks and threads any different? I mean, you can do asynchronous stuff with threads, you can suspend, kill, and all other stuff. Like, you say it's "good" but fail to provide any reasoning as to why. I mean like, a thread represents an actual OS-level thread, with its own stack and kernel resources, and with that you have the highest degree of control; you can Abort() or Suspend() or Resume() a thread , you can observe its state, and you can set thread-level properties like the stack size, apartment state, or culture, whereas with tasks you can't Abort or Suspend or Resume, and tasks will only create a new thread if it meets certain criteria. I can understand it newcomers to coding will automatically flock to this, but I wouldn't say it's superior to threading if the threads are handled properly.

Reply





Messages In This Thread