Visualizzazione dei risultati da 1 a 2 su 2
  1. #1
    Utente di HTML.it
    Registrato dal
    Sep 2005
    Messaggi
    142

    [Perl] prendere il valore di ritorno da un thread... problemi

    ciao a tutti...sto uscendo pazzo.. mi dite cosa c'è che non va in questo codice?

    Codice PHP:
    use thread;
    my @threads;

    threads->create(\&thread);
    while (@
    threads threads->list(threads::all)) {
        @
    threads threads->list(threads::joinable);
        foreach (@
    threads) {
            @
    outputThreads $_->join();
            print 
    "\n $outputThreads[0] \taaa\t $outputThreads[1] \taaa\n";
        }
    }

    sub thread {
        
    my $pippo 3;
        
    my $pluto 5;
        
        
    my @out;
        
    $out[0] = 2;
        
    $out[1] = 8;
        return (@
    out);

    non scrive nulla...

  2. #2
    Utente di HTML.it
    Registrato dal
    Sep 2005
    Messaggi
    142
    risolto si può chiudere

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.