multithreading - Does thread-safe generally imply greenlet-safe in Python? -
the situation have in mind using python extension module can call python, there may mixture of python , non-python stack frames @ point when greenlet yields.
i assume if module uses thread-local storage misbehave greenlets.
is there other reason why thread-safe module might not greenlet-safe?
edit: want know whether there difference between way context switches implemented greenlets vs. regular threads. greenlets take shortcuts might work python break kinds of extension module?
greenlets stay within single thread in python. cannot jump thread. if code thread-safe, greenlet safe.
another way @ greenlets execute 1 @ time, have little issues have threads.
Comments
Post a Comment