Results 1 to 5 of 5

Thread: Perl in the thread

  1. #1
    Join Date
    Feb 2010
    Posts
    546

    Perl in the thread

    Hi everybody,

    The thread is a single implementation of the process, it is the smallest of all the process of program execution control unit, the CPU can be the task of scheduling the smallest unit. I want to know how to implement of Perl in the thread, data sharing and synchronization between threads and finally summarized and concluded the full text of main content. Please help.

  2. #2
    Join Date
    Feb 2008
    Posts
    1,852

    Perl in the thread

    Perl v5.005 added to the Operating System-level thread support, this new feature is an experimental product, which is what we now call 5005threads threading model. For 5005threads threading model is, by default, all data structures are shared, so the user must be responsible for these simultaneous access to shared data structures. Today 5005threads are no longer recommended practical, Perl v5.10 later version, it will no longer support the 5005threads threading model. Check and reply.

  3. #3
    Join Date
    Apr 2008
    Posts
    1,948

    Perl in the thread

    Perl v5.6.0 to start the introduction of a new threading model, the interpreter threads, otherwise known as ithreads, is precisely in this release is stated for the first time put forward the 5005threads threading model in the future may be question is disabled. Nevertheless, ithreads at that time was a new experimental threading model, the user can not directly use it, the only way is through the fork function simulation. Check and reply.

  4. #4
    Join Date
    May 2008
    Posts
    2,012

    Perl in the thread

    In Perl, there may exist two different threading models. You need to determine the current Perl environment, which in the end supported by a thread implementation. To sum up, we have two methods: First one is in the shell, you can be through the implementation of perl - V | grep usethreads command to get the current threading model of the relevant information, such as the Shell model of the current thread to query Perl. In the Perl program, you can also use the Config module to dynamically obtain the Perl threading model of the relevant information. Check and reply.

  5. #5
    Join Date
    Apr 2008
    Posts
    2,005

    Perl in the thread

    Perl in a thread, as entities, and their lifetime can be roughly divided into two to create, run and exit the three stages. Create a thread made from scratch, running is the thread to complete its main stage, exit the thread die a natural means. Thread operation and the implementation is very similar to ordinary function has its own entrance parameters, a specific process and the implementation of the code after the return of one or a group of results, the only ordinary function call of the difference lies in the implementation of the new thread and the implementation of the current thread is in hand. All the best.

Similar Threads

  1. Thread Management in .Net
    By OPinaArTy in forum Software Development
    Replies: 5
    Last Post: 04-02-2011, 03:40 PM
  2. What is PERL and what are its uses?
    By Gadin in forum Software Development
    Replies: 10
    Last Post: 08-01-2011, 07:33 PM
  3. Synchronize a producer thread and a consumer thread in C#
    By Ayuka in forum Software Development
    Replies: 6
    Last Post: 10-11-2010, 04:04 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,564,593.71422 seconds with 17 queries