locked
std::thread and std::ifstream in a Store app?

    Question

  • Hey,

    I'm trying to port our existing in-house game engine for the windows store. Currently our threading is handled through a scheduling/dispatch system that uses a thread pool built with C++11s thread support. As the engine and its tests are already running on multiple platforms (Windows 7, OSX, Ubuntu etc...) and almost every function call is made through our dispatcher, we would prefer to stick with our existing system rather than rewrite for ppltasks. Is it possible to use std::ifstream for loading files as long as it's called from a worker thread? Or will this cause any games built with the engine to fail the Store verification process?

    Many Thanks,

    Mark

    Friday, February 15, 2013 11:26 PM

Answers

  • Hi Mark,

    You can run a test app through the Windows App Cert Kit to see if those API pass.

    I believe most of the C++ standard libraries should be allowed in a Windows Store app, but I'm not sure offhand about std::thread or std::ifstream specifically.

    See the C++ Doc Roadmap, which says:

    Windows Runtime types play well with Standard Template Library types. Most C++ Windows Store apps use Standard Template Library collections and algorithms, except at the ABI boundary.
    --Rob

    • Proposed as answer by Jesse Jiang Monday, February 18, 2013 7:22 AM
    • Marked as answer by Jesse Jiang Wednesday, February 20, 2013 2:25 AM
    Saturday, February 16, 2013 3:39 AM
    Owner