Comments (8)
Can only be implemented for Windows 8 and 10
from libraries.
Use the serial queue as a backup, if the OS not support one.
from libraries.
Hi,
At the moment I am replacing my own Concurrency library with stlab and I noticed that the main_executor is not implemented in neither Classic Win32 nor UWP( Windows 8/10 )
I haven't investigated the UWP case yet, but the Classic Win32 solution to the problem should be maybe something like this?
main_executor_changes.txt
Application::nativeWindowHandle() and Application::STLAB_EXECUTE_TASK should be provided by the application itself:
-
nativeWindowHandle() should return the HWND of our main window( e.g. the value returned from Win32 CreateWindow() function )
-
STLAB_EXECUTE_TASK should be the message id we want to assign( a safe value would be to use static constexpr int STLAB_EXECUTE_TASK = WM_USER + 0x0001; )
Do you think this can be implemented more elegantly? Any pointers?
Cheers
from libraries.
I just changed to Windows 10, so I did not look into a solution so far.
I did an implementation for Qt some while ago. It is at the end of my ACCU 2018 slides: https://github.com/ACCUConf/ACCUConf_PDFs/blob/master/2018/Felix_Petriconi_-_There_Is_A_New_Future.pdf
As soon as I have time, I will add it.
from libraries.
Thanks for the info Felix!
from libraries.
@sean-parent I'm working on #412 but not sure how to address this one. Input?
from libraries.
@sean-parent I'm working on #412 but not sure how to address this one. Input?
@dabrahams Since there are different main loops for different Windows tool sets, as far as I see it, it can be difficult to provide one that fits all. So far I have not seen a request for a main_executor. (I just work with Qt on Windows.)
from libraries.
I spent some time looking at this - I had always assumed Win32 had a main thread/window. But that does not appear to be the case. Instead, it seems closer to an actor model where every (root) window has its thread and message queue. The intent of the main_dispatcher
wasn't to change the model of the underlying OS facilities but to provide a common way to interact with them. I think we need to rethink the main_executor
idea. Perhaps instead we have a way to construct an executor from a platform resource. I would rather not provide a main_executor()
where it doesn't make sense.
That said, MFC apps have a CWinApp
which derives from CWinThread
so a main-executor would make sense with the MFC framework.
from libraries.
Related Issues (20)
- Version in CMakeLists.txt is not correct
- Some files are missing in ./stlab/CMakeLists.txt HOT 1
- Build Error for Portable Executor for c++14 HOT 1
- Executor of packaged_task not used in reduction HOT 7
- Extra Copy of Object in Future Somewhere
- wasm main executor object not defined
- Upgrade to 1.7.1 now requires Qt and Boost HOT 20
- Is documentation generation broken? HOT 12
- No build output HOT 2
- Generated config.hpp Disables Ability to Use Same Source For Multiple Platforms HOT 1
- main_executor_type lost in main_executor.hpp for EMSCRIPTEN HOT 1
- Problem with main_executor for Qt on application exit HOT 3
- WASM main_executor improvements
- Broken compatibility with Qt5 HOT 1
- Handling more then one priority_task_system instance HOT 6
- stlab documentation, best practice and performance HOT 3
- Express the type of `promise` HOT 3
- windows default executor is not exception safe.
- Add weak_future<>
- Update range based algorithms
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libraries.