Changeset 3aa0522 for perl/lib


Ignore:
Timestamp:
May 19, 2010, 9:58:09 PM (14 years ago)
Author:
David Benjamin <davidben@mit.edu>
Branches:
master, release-1.10, release-1.7, release-1.8, release-1.9
Children:
7c5d060
Parents:
8278543
git-author:
David Benjamin <davidben@mit.edu> (05/14/10 19:15:32)
git-committer:
David Benjamin <davidben@mit.edu> (05/19/10 21:58:09)
Message:
Deprecate the main loop hook, use on-demand perl timer

Users without a main loop hook shouldn't need to pay 1s wakeups, and
users with one probably want more control over the timeout anyway.

Signed-off-by: David Benjamin <davidben@mit.edu>
Location:
perl/lib/BarnOwl
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • perl/lib/BarnOwl/Hooks.pm

    rb30c256 r3aa0522  
    7979our %EXPORT_TAGS = (all => [@EXPORT_OK]);
    8080
     81use BarnOwl::MainLoopCompatHook;
     82
    8183our $startup = BarnOwl::Hook->new;
    8284our $shutdown = BarnOwl::Hook->new;
    8385our $receiveMessage = BarnOwl::Hook->new;
    8486our $newMessage = BarnOwl::Hook->new;
    85 our $mainLoop = BarnOwl::Hook->new;
     87our $mainLoop = BarnOwl::MainLoopCompatHook->new;
    8688our $getBuddyList = BarnOwl::Hook->new;
    8789our $getQuickstart = BarnOwl::Hook->new;
     
    162164    }
    163165   
     166    $mainLoop->check_owlconf();
    164167    $startup->run(0);
    165168    BarnOwl::startup() if *BarnOwl::startup{CODE};
     
    186189   
    187190    BarnOwl::new_msg($m) if *BarnOwl::new_msg{CODE};
    188 }
    189 
    190 sub _mainloop_hook {
    191     $mainLoop->run;
    192     BarnOwl::mainloop_hook() if *BarnOwl::mainloop_hook{CODE};
    193191}
    194192
Note: See TracChangeset for help on using the changeset viewer.