Sunday, September 24, 2017

cygwin-perl enable multithreading

Leave a Comment

I am using perl version 5.22 with cygwin. I am not able to figure out the problem in the following code. It looks like multi threading is not enable or something. When I ran the following code it just terminated without any message.

use warnings; use threads;  sub threaded_task {      threads -> create(sub {           print "Starting thread\n";         sleep(2);         print "Ending thread\n";       });  }  while(1) { threaded_task("arjun"); print "main thread\n"; sleep (2);  } 

64 bit config : enter image description here

32 bit config: enter image description here

0 Answers

If You Enjoyed This, Take 5 Seconds To Share It

0 comments:

Post a Comment