File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed
Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -152,7 +152,7 @@ impl Default for GenericFileOptions {
152152 fn default ( ) -> Self {
153153 Self {
154154 io_concurrency : 8 ,
155- io_dispatcher : IoDispatcher :: default ( ) ,
155+ io_dispatcher : IoDispatcher :: shared ( ) ,
156156 }
157157 }
158158}
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ use futures::FutureExt;
1414use futures:: channel:: oneshot;
1515use vortex_error:: { VortexResult , vortex_err} ;
1616
17- static DEFAULT : LazyLock < IoDispatcher > = LazyLock :: new ( IoDispatcher :: new) ;
17+ static SHARED : LazyLock < IoDispatcher > = LazyLock :: new ( IoDispatcher :: new) ;
1818
1919#[ cfg( feature = "compio" ) ]
2020use self :: compio:: * ;
@@ -108,8 +108,14 @@ impl IoDispatcher {
108108
109109impl Default for IoDispatcher {
110110 fn default ( ) -> Self {
111- // By default, we return a shared handle
112- DEFAULT . clone ( )
111+ Self :: new ( )
112+ }
113+ }
114+
115+ impl IoDispatcher {
116+ /// Returns a handle to the current process's shared Dispatcher.
117+ pub fn shared ( ) -> Self {
118+ SHARED . clone ( )
113119 }
114120}
115121
You can’t perform that action at this time.
0 commit comments