Threadpool RunAsync with data struct - Windows store / WinRT RRS feed

  • Question

  • im trying to convert some code from Windows to Windows store / WinRT

    but im having a hard time finding information on how to start new thread and send a data struct like in Windows where you just queue a QueueUserWorkItem with a WinCallback and a state

    any good suggestions

    Monday, August 19, 2013 7:41 AM


All replies

  • In most cases you will be best off using the task system for asynchronous programming in Windows Store apps. See Asynchronous programming with C++. If that won't meet your specific needs then you can use the thread pool directly. See Using the thread pool in Windows Store apps for details.

    Monday, August 19, 2013 3:10 PM
  • You may find this little façade module useful as well.
    Monday, August 19, 2013 6:56 PM
  • Hi arosendal

    You need to use thread pool. Here you can also send a function for executing into a different thread. Like Windows you can send function pointer to delegate and execute the completion delegate. See the link Rob mentioned and clarify your exact problem.

    Tuesday, August 20, 2013 2:38 AM
  • @Mokarrom Hossain:

    Where is the link ? Please mention the link.

    Thursday, August 22, 2013 10:04 AM
  • Ashish,

    Please read my initial response to you. The links Mokarrom mentions are in that post.


    Thursday, August 22, 2013 7:44 PM