- 
                Notifications
    
You must be signed in to change notification settings  - Fork 77
 
Add support for domain local await #494
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
e9b7703    to
    0a7d1fd      
    Compare
  
    | 
           Interesting. I guess this doesn't even need any changes in Eio. You could just run any Eio event loop and then wrap Domain_mgr to install this handler in all new domains, right?  | 
    
7921d00    to
    5bb91d2      
    Compare
  
    
          
 Yes, I think for many schedulers it would be possible to provide domain local await outside of the scheduler by implementing it in terms of the public API of the scheduler and then installing it within a fiber running on the scheduler. However, for better UX / DX it is preferable to have schedulers provide the support directly. Of course, DLA is experimental at this stage and it is quite possible that it might be replaced with some official standard blocking mechanism, but I think that for the short term it would be great to be able to have various libraries that need blocking to be able to cooperate through it.  | 
    
22f9e38    to
    a3e0e62      
    Compare
  
    Co-authored-by: Thomas Leonard <[email protected]>
cf044ae    to
    f55c105      
    Compare
  
    There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good (I just squashed and rebased it).
This PR adds domain local await support to Eio. Domain local await allows blocking abstractions to work across different schedulers.
I've also made a similar PR to Domainslib. If and when both Eio and Domainslib merge the support for domain local await, it should be possible to use upcoming version of kcas to easily communicate between Eio and Domainslib domains. Perhaps lockfree could also adopt use of domain local await until we get some official blocking mechanism.