You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I am new to Rust, so please excuse my potentially basic question.
What is the recommended way to have a
Task
compute
implementation that is async? I want to have code that is like the following:But I get a compile error saying that "async trait functions are not currently supported". If I change my compute function to the following:
Would that be OK? Assuming I started this task with
AsyncTask::new
,block_on
should only block the execution of this task and no other threads, right?Beta Was this translation helpful? Give feedback.
All reactions