@@ -67,17 +67,17 @@ impl ThreadExecutor {
67
67
68
68
/// Gets the `[ThreadSpawner]` for the thread executor.
69
69
/// Use this to spawn tasks that run on the thread this was instantiated on.
70
- pub fn spawner ( & self ) -> ThreadSpawner < ' static > {
71
- ThreadSpawner ( self . executor . clone ( ) )
70
+ pub fn spawner ( & self ) -> ThreadExecutorSpawner < ' static > {
71
+ ThreadExecutorSpawner ( self . executor . clone ( ) )
72
72
}
73
73
74
74
/// Gets the `[ThreadTicker]` for this executor.
75
75
/// Use this to tick the executor.
76
76
/// It only returns the ticker if it's on the thread the executor was created on
77
77
/// and returns `None` otherwise.
78
- pub fn ticker ( & self ) -> Option < ThreadTicker > {
78
+ pub fn ticker ( & self ) -> Option < ThreadExecutorTicker > {
79
79
if thread:: current ( ) . id ( ) == self . thread_id {
80
- return Some ( ThreadTicker {
80
+ return Some ( ThreadExecutorTicker {
81
81
executor : self . executor . clone ( ) ,
82
82
_marker : PhantomData :: default ( ) ,
83
83
} ) ;
@@ -88,8 +88,8 @@ impl ThreadExecutor {
88
88
89
89
/// Used to spawn on the [`ThreadExecutor`]
90
90
#[ derive( Debug , Clone ) ]
91
- pub struct ThreadSpawner < ' a > ( Arc < Executor < ' a > > ) ;
92
- impl < ' a > ThreadSpawner < ' a > {
91
+ pub struct ThreadExecutorSpawner < ' a > ( Arc < Executor < ' a > > ) ;
92
+ impl < ' a > ThreadExecutorSpawner < ' a > {
93
93
/// Spawn a task on the thread executor
94
94
pub fn spawn < T : Send + ' a > ( & self , future : impl Future < Output = T > + Send + ' a ) -> Task < T > {
95
95
self . 0 . spawn ( future)
@@ -100,12 +100,12 @@ impl<'a> ThreadSpawner<'a> {
100
100
/// make progress unless it is manually ticked on the thread it was
101
101
/// created on.
102
102
#[ derive( Debug ) ]
103
- pub struct ThreadTicker {
103
+ pub struct ThreadExecutorTicker {
104
104
executor : Arc < Executor < ' static > > ,
105
105
// make type not send or sync
106
106
_marker : PhantomData < * const ( ) > ,
107
107
}
108
- impl ThreadTicker {
108
+ impl ThreadExecutorTicker {
109
109
/// Tick the thread executor.
110
110
pub fn tick ( & self ) -> impl Future < Output = ( ) > + ' _ {
111
111
self . executor . tick ( )
0 commit comments