Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

coro::makemaker(3pm) [debian man page]

MakeMaker(3pm)						User Contributed Perl Documentation					    MakeMaker(3pm)

NAME
Coro::MakeMaker - MakeMaker glue for the XS-level Coro API SYNOPSIS
This allows you to control coroutines from C/XS. DESCRIPTION
For optimal performance, hook into Coro at the C-level. You'll need to make changes to your "Makefile.PL" and add code to your "xs" / "c" file(s). WARNING
When you hook in at the C-level you can get a huge performance gain, but you also reduce the chances that your code will work unmodified with newer versions of "perl" or "Coro". This may or may not be a problem. Just be aware, and set your expectations accordingly. HOW TO
Makefile.PL use Coro::MakeMaker qw(coro_args); # ... set up %args ... WriteMakefile (coro_args (%args)); XS #include "CoroAPI.h" BOOT: I_CORO_API ("YourModule"); API This is just a small overview - read the Coro/CoroAPI.h header file in the distribution, and check the examples in EV/ and Event/*, or as a more real-world example, the Deliantra game server (which uses Coro::MakeMaker). #define CORO_TRANSFER(prev,next) /* transfer from prev to next */ #define CORO_SCHEDULE /* like Coro::schedule */ #define CORO_CEDE /* like Coro::cede */ #define CORO_CEDE_NOTSELF /* like Coro::cede_notself */ #define CORO_READY(coro) /* like $coro->ready */ #define CORO_IS_READY(coro) /* like $coro->is_ready */ #define CORO_NREADY /* # of procs in ready queue */ #define CORO_CURRENT /* returns $Coro::current */ #define CORO_THROW /* exception pending? */ #define CORO_READYHOOK /* hook for event libs, see Coro::EV */ #define CORO_SV_STATE(coro) /* returns the internal struct coro * */ #define CORO_EXECUTE_SLF(cv,init,ax) /* execute a schedule-like function */ #define CORO_EXECUTE_SLF_XS(init) /* SLF in XS, see e.g. Coro::EV */ perl v5.14.2 2012-04-13 MakeMaker(3pm)

Check Out this Related Man Page

Specific(3pm)						User Contributed Perl Documentation					     Specific(3pm)

NAME
Coro::Specific - manage coroutine-specific variables. SYNOPSIS
use Coro::Specific; my $ref = new Coro::Specific; $$ref = 5; print $$ref; DESCRIPTION
This module can be used to create variables (or better: references to them) that are specific to the currently executing coroutine. This module does not automatically load the Coro module (so the overhead will be small when no coroutines are used). A much faster method is to store extra keys into %$Coro::current - all you have to do is to make sure that the key is unique (e.g. by prefixing it with your module name). You can even store data there before loading the Coro module - when Coro is loaded, the keys stored in %$Coro::current are automatically attached to the coro thread executing the main program. You don't have to load "Coro::Specific" manually, it will be loaded automatically when you "use Coro" and call the "new" constructor. new Create a new coroutine-specific scalar and return a reference to it. The scalar is guarenteed to be "undef". Once such a scalar has been allocated you cannot deallocate it (yet), so allocate only when you must. BUGS
The actual coroutine specific values do not automatically get destroyed when the Coro::Specific object gets destroyed. AUTHOR
Marc Lehmann <schmorp@schmorp.de> http://home.schmorp.de/ perl v5.14.2 2012-04-13 Specific(3pm)
Man Page

2 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

#define in perl

Hi friends, I am not sure if perl questions can be raised here. :rolleyes: But I have a doubt if there is a way to do "#define" in perl, like in C. Does anyone know if it is feasible (without CPAN modules)? Thanks, Srini (7 Replies)
Discussion started by: srinivasan_85
7 Replies

2. Programming

error:'MSG_R' undeclared (first use in this function) under Solaris

I read book Unix Network Programming written by Richard,and it define following code under unpipc.c #define SVMSG_MODE (MSG_R | MSG_W | MSG_R>>3 | MSG_R>>6) when I compile code,it raise following error: error:'MSG_R' undeclared (first use in this function) error:'MSG_W' undeclared (first use... (1 Reply)
Discussion started by: konvalo
1 Replies