Changeset f265f94


Ignore:
Timestamp:
Jan 8, 2007, 7:39:23 PM (18 years ago)
Author:
Alejandro R. Sedeño <asedeno@mit.edu>
Branches:
master, barnowl_perlaim, debian, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
46e8a1e
Parents:
00f9a7d
Message:
Ripping out the thread support from perlwrap.pm, since we don't need
it and perl threads suck.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • perlwrap.pm

    r00f9a7d rf265f94  
    290290
    291291################################################################################
    292 # Mainloop hook and threading.
    293 ################################################################################
    294 
    295 use threads;
    296 use threads::shared;
    297 
    298 # Shared thread shutdown flag.
    299 # Consider adding a reload flag, so threads that should persist across reloads
    300 # can distinguish the two events. We wouldn't want a reload to cause us to
    301 # log out of and in to a perl-based IM session.
    302 our $shutdown : shared;
     292# Mainloop hook
     293################################################################################
     294
     295our $shutdown;
    303296$shutdown = 0;
    304 our $reload : shared;
     297our $reload;
    305298$reload = 0;
    306299
     
    340333# Put things in ~/.owl/shutdown
    341334
    342 # At this point I use owl::shutdown to tell any auxillary threads that they
    343 # should terminate.
     335    # use $shutdown to tell modules that that's what we're doing.
    344336    $shutdown = 1;
    345337    mainloop_hook();
     
    362354# Reload Code, taken from /afs/sipb/user/jdaniel/project/owl/perl
    363355################################################################################
    364 sub reload_hook (@)
    365 {
    366    
    367 
     356sub reload_hook (@)
     357{
    368358    onStart();
    369359    return 1;
    370360}
    371361
    372 sub reload 
    373 {
    374     # Shutdown existing threads.
     362sub reload
     363{
     364    # Use $reload to tell modules that we're performing a reload.
    375365    $reload = 1;
    376366    owl::mainloop_hook();
     
    378368    @onMainLoop = ();
    379369    @onStartSubs = ();
    380    
     370
    381371    # Do reload
    382372    package main;
Note: See TracChangeset for help on using the changeset viewer.