Collectd.pm: Use threads::shared to share @plugins between threads.
authorSebastian Harl <sh@tokkee.org>
Sat, 17 Nov 2007 17:43:19 +0000 (18:43 +0100)
committerFlorian Forster <octo@huhu.verplant.org>
Tue, 20 Nov 2007 08:04:43 +0000 (09:04 +0100)
commit3e3d0bbc60bf926eea8058f3edfbb600f84b02bd
treea0a8c0f3ac56dcac4dd9e8b72e5fe9017ea1bfb0
parent3a28b39818c323b1dc8dfa8b5afcd24220a6ddee
Collectd.pm: Use threads::shared to share @plugins between threads.

The list of plugins has to be common to all threads to be able to (un)register
callbacks after initialization. As threads::shared is not able to share
references to subroutines the callbacks now have to be identified by their
name. Collectd::call_by_name() is used to execute the callbacks.

Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
bindings/perl/Collectd.pm