문제

Why does this work:

>>> import greenlet
>>> greenlet.getcurrent()
<greenlet.greenlet object at 0x02244030>

I haven't started any greenlets yet, so what is getcurrent() returning? Is there a 'default greenlet' that gets run when I import the package? Or is this just the 'greenlet representation' of my current program stack.

도움이 되었습니까?

해결책

It returns the "main greenlet", which indeed is just a representation of the main program outside any other explicit greenlet.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top