[−][src]Function async_runtime::init_allow_same
pub fn init_allow_same(config: Config) -> Result<(), Error>
Set the executor to use for this thread. The difference with init
is that this will not return
a ErrorKind::DoubleExecutorInit
error if you init with the same executor twice. It will still err
if you try to set 2 different executors for this thread.
This can sometimes be convenient for example if you would like to make two async fn sync in the same thread with macro attributes (they use this method). You should rarely need this.