How to control file access when more than one parallel tasks access a same file? RRS feed

  • Question

  • Hi, 

    I use Asynchronous programming in C++ task in my app and several tasks would access a same file at the same time. Is there any suggested tech to control the tasks to access the same file correctly? 

    Because we cannot access thread when using task, can classic tech like mutex or event use in task?

    Sunday, October 13, 2013 8:44 AM


  • tasks are an abstration over threats. so 2 tasks running on the same thraed in the same time wont happen. so you still can use mutex and locks

    Microsoft Certified Solutions Developer - Windows Store Apps Using C#

    • Marked as answer by Lattimore Sunday, October 13, 2013 10:57 AM
    Sunday, October 13, 2013 10:25 AM