Rudziankoŭ
Rudziankoŭ

Reputation: 11251

Does each reactor run in it's own thread?

Profiling my twisted app I am seeing that twisted/application/app.py:startReactor was called 496 times. Apart of this, I am seeing thread leaking: ~500 threads were created by the app, most of them are idle in FUTEX_WAIT_PRIVATE. During this profiling simple load test were run: ~1rps.

Does it mean that somewhere in the code reactor.run() is leaking? Where should I start digging?

Upvotes: 0

Views: 169

Answers (1)

Jean-Paul Calderone
Jean-Paul Calderone

Reputation: 48315

In general, no. reactor.run does not start a thread. However, if you have an application that starts 496 reactors then maybe it starts threads in which to run each of them.

Upvotes: 1

Related Questions