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

Comparing Coro-Multicore/Multicore.xs (file contents):
Revision 1.28 by root, Tue Dec 17 19:19:32 2019 UTC vs.
Revision 1.29 by root, Tue Aug 3 14:15:39 2021 UTC

295set_thread_enable (pTHX_ void *arg) 295set_thread_enable (pTHX_ void *arg)
296{ 296{
297 thread_enable = PTR2IV (arg); 297 thread_enable = PTR2IV (arg);
298} 298}
299 299
300static void
301atfork_child (void)
302{
303 s_epipe_renew (&ep);
304}
305
300MODULE = Coro::Multicore PACKAGE = Coro::Multicore 306MODULE = Coro::Multicore PACKAGE = Coro::Multicore
301 307
302PROTOTYPES: DISABLE 308PROTOTYPES: DISABLE
303 309
304BOOT: 310BOOT:
312 X_TLS_INIT (check_key); 318 X_TLS_INIT (check_key);
313#endif 319#endif
314 320
315 if (s_epipe_new (&ep)) 321 if (s_epipe_new (&ep))
316 croak ("Coro::Multicore: unable to initialise event pipe.\n"); 322 croak ("Coro::Multicore: unable to initialise event pipe.\n");
323
324 pthread_atfork (0, 0, atfork_child);
317 325
318 perl_thx = PERL_GET_CONTEXT; 326 perl_thx = PERL_GET_CONTEXT;
319 327
320 I_CORO_API ("Coro::Multicore"); 328 I_CORO_API ("Coro::Multicore");
321 329

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines