ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Coro/Coro/State.xs
(Generate patch)

Comparing Coro/Coro/State.xs (file contents):
Revision 1.438 by root, Mon Nov 18 10:27:53 2013 UTC vs.
Revision 1.440 by root, Sat Feb 22 14:12:45 2014 UTC

14#include "perliol.h" 14#include "perliol.h"
15 15
16#include "schmorp.h" 16#include "schmorp.h"
17 17
18#define ECB_NO_THREADS 1 18#define ECB_NO_THREADS 1
19#define ECB_NO_LIBM 1
19#include "ecb.h" 20#include "ecb.h"
20 21
21#include <stddef.h> 22#include <stddef.h>
22#include <stdio.h> 23#include <stdio.h>
23#include <errno.h> 24#include <errno.h>
1916 /* nothing to schedule: call the idle handler */ 1917 /* nothing to schedule: call the idle handler */
1917 if (SvROK (sv_idle) 1918 if (SvROK (sv_idle)
1918 && SvOBJECT (SvRV (sv_idle))) 1919 && SvOBJECT (SvRV (sv_idle)))
1919 { 1920 {
1920 if (SvRV (sv_idle) == SvRV (coro_current)) 1921 if (SvRV (sv_idle) == SvRV (coro_current))
1922 {
1923 require_pv ("Carp");
1924
1925 {
1926 dSP;
1927
1928 ENTER;
1929 SAVETMPS;
1930
1931 PUSHMARK (SP);
1921 croak ("FATAL: $Coro::IDLE blocked itself - did you try to block inside an event loop callback? Caught"); 1932 XPUSHs (sv_2mortal (newSVpv ("FATAL: $Coro::IDLE blocked itself - did you try to block inside an event loop callback? Caught", 0)));
1933 PUTBACK;
1934 call_pv ("Carp::confess", G_VOID | G_DISCARD);
1935
1936 FREETMPS;
1937 LEAVE;
1938 }
1939 }
1922 1940
1923 ++coro_nready; /* hack so that api_ready doesn't invoke ready hook */ 1941 ++coro_nready; /* hack so that api_ready doesn't invoke ready hook */
1924 api_ready (aTHX_ SvRV (sv_idle)); 1942 api_ready (aTHX_ SvRV (sv_idle));
1925 --coro_nready; 1943 --coro_nready;
1926 } 1944 }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines