but if i require FCGI first time in thread, such as:#!/usr/bin/env perl use v5.16.3; use threads (exit => 'threads_only'); use threads::shared; use FCGI; threads->create(\&thread); threads->create(\&thread); threads->create(\&thread); while (threads->list(threads::all)) { sleep 1 } #wait until has thr +eads sub thread { sleep 3; threads->detach; threads->exit; return; } 1; __END__
thread can exit without any errors.#!/usr/bin/env perl use v5.16.3; use threads (exit => 'threads_only'); use threads::shared; threads->create(\&thread); threads->create(\&thread); threads->create(\&thread); while (threads->list(threads::all)) { sleep 1 } #wait until has thr +eads sub thread { require FCGI; # <--- HERE IS THE DIFFERENCE sleep 3; threads->detach; threads->exit; return; } 1; __END__
This bug prevent use FCGI.pm with threads. Does somebody has a working solution to use FCGI in main thread?
In reply to [FCGI.pm] - not threads-safe? by zdm
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |