cirne100
cirne100

Reputation: 1558

Load modules in Perl at run time and share it between threads

Is it possible to load modules at run time, require '/file_path/file_name.pm'; , and share the memory between threads?

Basically, I have a pool of threads, if thread#1 decides to load a module, I want the module available to all the threads!

Upvotes: 1

Views: 122

Answers (1)

cirne100
cirne100

Reputation: 1558

"No, it's not possible. Either the module must be loaded before the thread is created, or each thread must individually load the module."

Thanks to Dave Mitchell 1

Upvotes: 1

Related Questions