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

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -