Can we use async #293
              
                Unanswered
              
          
                  
                    
                      harshkumar314e
                    
                  
                
                  asked this question in
                Q&A
              
            Replies: 0 comments
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am trying to use a external crate casbin for authorization, the initialize method of enforcer is async by nature. I am using OnceCell to store the resultant enforcer. Apart from this the enforce method is sync only.
Is there any way to call this async fn and do polling, or any other method to achieve the same thing. I tried
block onof futures crate and also tried creating builder from tokio's runtime, but got error that polling is not supported.Any solution or comment? Thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions