Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
main task needs to run on the main OS thread #2058
Here's the current plan. The main task continues to be non-special, but we create another single-threaded scheduler called 'main_thread_sched' that has a single scheduler thread running on the OS main thread. Users can choose to spawn tasks into this scheduler.
Requires giving schedulers a first class representation in core, reworking how scheduler lifetime works, and refactoring a bunch of runtime code.
@Jonanin that's a point worth considering. My concern previously was that making the main task special could have some subtle, non-obvious side effects.
Off hand this is what I can think of: