MCPcopy Create free account
hub / github.com/NthTensor/Forte / try_enroll

Method try_enroll

src/thread_pool.rs:802–824  ·  view source on GitHub ↗
(&'static self)

Source from the content-addressed store, hash-verified

800 ///
801 /// See also: [`Worker::block_on`] and [`block_on`].
802 #[inline(always)]
803 pub fn block_on<F, T>(&'static self, future: F) -> T
804 where
805 F: Future<Output = T> + Send,
806 T: Send,
807 {
808 self.get_worker(|worker| match worker {
809 Some(worker) => worker.block_on(future),
810 None => futures_lite::future::block_on(future),
811 })
812 }
813
814 /// Executes the two closures, possibly in parallel.
815 ///
816 /// See also: [`Worker::join`] and [`join`].
817 #[inline(always)]
818 pub fn join<A, B, RA, RB>(&'static self, a: A, b: B) -> (RA, RB)
819 where
820 A: FnOnce(&Worker) -> RA + Send,
821 B: FnOnce(&Worker) -> RB + Send,
822 RA: Send,
823 RB: Send,
824 {
825 self.with_worker(|worker| worker.join(a, b))
826 }
827

Callers 1

enrollMethod · 0.80

Calls 1

get_member_dataMethod · 0.80

Tested by

no test coverage detected