remove `gnc.escape`.
The original intention of `gnc.escape` was to tell `gnc.await` not to handle generator functions that have gone through this function. In fact, no one uses this function at all, because there would never be a situation where a normal function returns a generator function when `genCoroutine` is needed. Now that `gnc.await` has been removed from the project, there is even less need for `gnc.escape` to exist.
This commit is contained in:
parent
cfc2c8b69b
commit
58379d5835
|
@ -93,10 +93,12 @@
|
||||||
Promise.resolve(result).then(nexts,throws);
|
Promise.resolve(result).then(nexts,throws);
|
||||||
}),
|
}),
|
||||||
*/
|
*/
|
||||||
|
/*
|
||||||
escape:gen=>{
|
escape:gen=>{
|
||||||
gen.nocoroutine=true;
|
gen.nocoroutine=true;
|
||||||
return gen;
|
return gen;
|
||||||
},
|
},
|
||||||
|
*/
|
||||||
is:{
|
is:{
|
||||||
coroutine:item=>(typeof item=="function"||gnc.is.generator(item))&&item.name=="genCoroutine",
|
coroutine:item=>(typeof item=="function"||gnc.is.generator(item))&&item.name=="genCoroutine",
|
||||||
generatorFunc:item=>item instanceof GeneratorFunction,
|
generatorFunc:item=>item instanceof GeneratorFunction,
|
||||||
|
@ -7309,7 +7311,7 @@
|
||||||
gnc:{
|
gnc:{
|
||||||
async:fn=>gnc.async(fn),
|
async:fn=>gnc.async(fn),
|
||||||
//await:gen=>gnc.await(gen),
|
//await:gen=>gnc.await(gen),
|
||||||
escape:gen=>gnc.escape(gen),
|
//escape:gen=>gnc.escape(gen),
|
||||||
is:{
|
is:{
|
||||||
coroutine:item=>gnc.is.coroutine(item),
|
coroutine:item=>gnc.is.coroutine(item),
|
||||||
generatorFunc:item=>gnc.is.generatorFunc(item),
|
generatorFunc:item=>gnc.is.generatorFunc(item),
|
||||||
|
|
Loading…
Reference in New Issue