> Hello list, > > I think the get_free_signal() from here > https://github.com/unbit/uwsgi/blob/master/uwsgidecorators.py#L20 > > is not thread-safe? > > num = get_free_signal() > uwsgi.register_signal(num, '', myfunc) > > So two threads might actually register with the same signal number? Is > this > OK by design? > > My second question is: since it's obvious that we can only have max 256 > signal numbers, does this mean we can not monitor more than 256 files, or > adding thousands of dynamic cronjobs? > _______________________________________________ > uWSGI mailing list > [email protected] > http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi >
signal handlers have to be registered in the master or (in the case of java and mono) as soon as a worker start. They are not meant for "dynamic" registration. By the way you can monitor all of the file you need (different monitors can trigger the same signal), but could be unpractical as you have no way to know who has raised the signal. The same rule applies for cron registered in your app. Crons registered in the config have no limits as they are not signal-based. -- Roberto De Ioris http://unbit.it _______________________________________________ uWSGI mailing list [email protected] http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
