Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7160603
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T13:25:33+00:00 2026-05-28T13:25:33+00:00

I want to do following things from main thread/process: Communicate to another process using

  • 0

I want to do following things from main thread/process:

  1. Communicate to another process using pipe.

  2. Create threads to do certain task.

  3. Wait for all the threads to complete.

Following is the pseudo code I am trying:

 use threads;
 use IO::Handle;
 sub dummy {
      print "\n!!!!". $$;
      return 0;
 }

 open($handle, "| cat -v") || die "Unable to open connection to BT Driver: $!\n";

 $handle->autoflush(1);

 #close $handle; If I uncomment this, threads can be joined. But I don't want to terminate this child process.

 $thr2 = threads->create(\&dummy);
 sleep 2;
 print "\n$thr2";
 foreach $thr (threads->list(threads::joinable))
 {
      print "\nIam here";
      print "\n!!!". $thr;
      $thr->join();
 }

Code gets stuck when I try to join the thread even though it is joinable.

Am I doing something fundamentally wrong here?
I am using Perl 5.10.0

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T13:25:34+00:00Added an answer on May 28, 2026 at 1:25 pm

    I don’t have a 5.10.0 with threads compiled to try it, but 5.12.4 hangs at “Iam here”. 5.14.1 runs to completion.

    Perl threads have a lot of bugs, but it’s gotten much better in recent years. 5.10.0 is probably going to be full of bugs and the simplest way to solve it (and a lot of problems) is to just upgrade Perl.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want the following functionality using php I have a csv file. Each file
With win32api, I want that the following program creates two process and creates a
In file foo.py I want to import class A from file main.py with the
I am currently trying to create a win32 service using pywin32. My main point
I need to match certain things from lines of an input text. The lines
I want to communicate between C++ and QML on Meego. It happens using C++
I want the following layout to appear on the screen: FieldName 1 [Field input
i want the following functionality. input : this is test <b> bold text </b>
Is there a language agnostic algorithm to name tuples? Specifically, I want the following
The problem is following: I want to automate the way my emacs starts. It

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.