We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dc9a01b commit c4f449bCopy full SHA for c4f449b
src/hxcoro/run/Setup.hx
@@ -78,6 +78,14 @@ class Setup {
78
);
79
}
80
81
+ static public function createLuvThreadPool() {
82
+ final pool = new hxcoro.thread.FixedThreadPool(10);
83
+ return createLuvGen(
84
+ (uvLoop, loop) -> new hxcoro.dispatchers.LuvDispatcher(uvLoop, loop),
85
+ dispatcher -> pool.shutDown()
86
+ );
87
+ }
88
+
89
#elseif interp
90
91
static public function createLuv() {
@@ -111,8 +119,10 @@ class Setup {
111
119
#end
112
120
113
121
static public function createDefault() {
114
- #if (cpp && hxcpp_luv_io || interp)
122
+ #if interp
115
123
return createLuv();
124
+ #elseif (cpp && hxcpp_luv_io)
125
+ return createLuvThreadPool();
116
126
#elseif (jvm || cpp || hl)
117
127
return createThreadPool(10);
118
128
#else
0 commit comments