1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/// The configuration for wich executor that should be used on this thread.
//
#[ derive( Debug, Clone, Hash, PartialEq, Eq ) ]
//
pub enum RtConfig
{
	/// A threadpool. Currently [juliex](https://github.com/withoutboats/juliex), but might change in the future.
	//
	Pool  ,

	/// An executor that runs futures on the current thread, capable of running `!`[`Send`] futures. Currently uses
	/// `futures::executor::LocalPool`.
	//
	Local ,
}


impl Default for RtConfig
{
	fn default() -> Self
	{
		#[ cfg( feature = "juliex" ) ]
		//
		return RtConfig::Pool;

		#[ cfg( not( feature = "juliex" ) ) ]
		//
		return RtConfig::Local;
	}
}