Changeset 346

Show
Ignore:
Timestamp:
05/07/07 15:36:32 (2 years ago)
Author:
kindlund
Message:

oops… was signalling thread was finished before it actually was finished

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • honeyclient/branches/exp/kindlund-filesystem/lib/HoneyClient/Agent.pm

    r345 r346  
    721721            threads->yield(); 
    722722 
    723             # XXX: Fix this? 
    724             threads->detach(); # XXX: Test this. 
    725      
    726723            # Trap all faults that may occur from these asynchronous operations. 
    727724            eval { 
     
    917914            } 
    918915 
    919             # XXX: Fix this? 
    920             #threads->detach(); # XXX: Test this. 
     916            # This threads->detach() call needs to be at the end of the 
     917            # thread code, because by calling this, we signal that the 
     918            # child thread is no longer running and thus the 
     919            # thread->is_running() would return false. 
     920            threads->detach(); 
    921921            # XXX: Debugging, remove eventually.  
    922922            print "About to return out of child thread.\n"; 
     
    929929        # Set the valid thread ID. 
    930930        if ($thread->is_running()) { 
     931            # XXX: Debugging, remove eventually.  
     932            print "Thread ID = " . $thread->tid() . "\n"; 
    931933            $data->{$driverName}->{'thread_id'} = $thread->tid(); 
    932934        } else { 
     935            # XXX: Debugging, remove eventually.  
     936            print "Thread ID = undef\n"; 
    933937            $data->{$driverName}->{'thread_id'} = undef; 
    934938        }