Using threads and poll in nginx module

Dear all,

I run into following problem when writing a module for nginx under
Linux.

Within my module I have to use a library which internally uses multiple
threads (pthreads) as well as poll.

When using/calling methods of this library in main initialization
handler of
my nginx module everything works fine.

Problem: But when I try to execute same code within other handling
methods
then the library is no longer working and method calls that internally
use
poll and threads seems to hang forever.

So my questions are:

  1. Is it possible to use a library in an nginx module that internally
    uses
    poll and multiple threads?
  2. If not, is there any approach to use such a library within a nginx
    module?

Thanks for your help.
Best regards Kline

Posted at Nginx Forum: