Global perl variables across all threads with rlm_perl ?
Chaigneau, Nicolas
nicolas.chaigneau at capgemini.com
Fri Feb 7 09:13:30 CET 2014
OK, I figured out something that works :)
I have rebuilt rlm_perl without ithreads so that it is considered as "thread unsafe" by FreeRADIUS.
This allows me to have in the perl execution the same persistent variables for all FreeRADIUS threads.
I know I don't have parallelism anymore in the perl module, but it's ok for me. Most of this code would have been in critical section anyway.
I have ran some preliminary benchs which yield very good results. It's very fast, even with the lack of parallelism.
Thanks again for your time.
Nicolas.
> On 6 Feb 2014, at 10:44, Chaigneau, Nicolas
> <nicolas.chaigneau at capgemini.com> wrote:
>
> > Hello,
> >
> >
> > I'm trying to use global variables in the perl code of a rlm_perl
> instance.
> >
> > What I notice is that such variables do persist, but that each
> FreeRADIUS thread has its own instance of the global variables.
> >
> > I would like to have some global variables shared by all threads.
> > Is that possible with rlm_perl ?
>
> Why?
>
> Arran Cudbard-Bell <a.cudbardb at freeradius.org>
This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.
More information about the Freeradius-Devel
mailing list