BSD Ports

devel/p5-threads 2.21_1 MidnightBSD

Perl interpreter-based threads

System
MidnightBSD
Repository
mports
Maintainer
[email protected]
License
artistic, gpl+
Categories
devel, perl5

Description

Perl 5.6 introduced something called interpreter threads. Interpreter threads are different from 5005threads (the thread model of Perl 5.005) by creating a new Perl interpreter per thread, and not sharing any data or state between threads by default.

Prior to Perl 5.8, this has only been available to people embedding Perl, and for emulating fork() on Windows.

The threads API is loosely based on the old Thread.pm API. It is very important to note that variables are not shared between threads, all variables are by default thread local. To use shared variables one must use threads::shared.

It is also important to note that you must enable threads by doing use threads as early as possible in the script itself, and that it is not possible to enable threading inside an eval "", do, require, or use. In particular, if you are intending to share variables with threads::shared, you must use threads before you use threads::shared. (threads will emit a warning if you do it the other way around.)

In the other systems

SystemPortVersion
MidnightBSDdevel/p5-threads2.21_1
DragonFlydevel/p5-threads2.21

Install

Binary package:

mport install p5-threads

From mports:

cd /usr/mports/devel/p5-threads && make install clean

To depend on this port in another port's Makefile:

RUN_DEPENDS=	p5-threads>0:devel/p5-threads

Dependencies

No port depends on this one.

Configuration

No options to configure.

USES
perl5
Service scripts
none

Files

pkg-plist 3
  • %%SITE_ARCH%%/auto/threads/threads.so
  • %%SITE_ARCH%%/threads.pm
  • %%PERL5_MAN3%%/threads.3.gz
distinfo 1
FileSizeSHA256
threads-2.21.tar.gz11344628394c98a2bcae6f20ffb8a3d965a1c194b764c650169e2050ee38dbaa10f110
Master sites 1
  • CPAN