locked
About the process that hosts more than one background task.

    Question

  • Hi,

    Reference the article: which process host my background task, I know some difference between js background task and C++ background task.

    Now I meet a different scene:

    If My app registered two background tasks under MaintenanceTrigger using javascript.

    Do they run in a same host process when the two background tasks are triggered almost at the same time? In other words,  I worry about that there may be some conflict if the two background tasks run in the different process.

    Thursday, November 14, 2013 3:27 AM

Answers

  • Hi Lattimore,

    Read this for more information: http://www.microsoft.com/en-us/download/details.aspx?id=27411, in chapter <Background task host executable>. Basically background task registered under MaintenanceTrigger will always host by system, which is BackgroundTaskHost.exe. And for your question, background tasks for JavaScript App are launched in a new single-threaded apartment (ASTA) within the WWA host process. I don't think they will be any conflict between them.

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    • Marked as answer by Lattimore Wednesday, November 20, 2013 2:18 AM
    Monday, November 18, 2013 11:34 AM
    Moderator

All replies

  • Hi Lattimore,

    Read this for more information: http://www.microsoft.com/en-us/download/details.aspx?id=27411, in chapter <Background task host executable>. Basically background task registered under MaintenanceTrigger will always host by system, which is BackgroundTaskHost.exe. And for your question, background tasks for JavaScript App are launched in a new single-threaded apartment (ASTA) within the WWA host process. I don't think they will be any conflict between them.

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    • Marked as answer by Lattimore Wednesday, November 20, 2013 2:18 AM
    Monday, November 18, 2013 11:34 AM
    Moderator
  • Thanks for answer. I have tested my background tasks and they were running in the same process named WWAHost.exe as you said.

    Sorry so long to reply.

    Wednesday, November 20, 2013 2:24 AM