Changeset f265f94
- Timestamp:
- Jan 8, 2007, 7:39:23 PM (18 years ago)
- 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
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
perlwrap.pm
r00f9a7d rf265f94 290 290 291 291 ################################################################################ 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 295 our $shutdown; 303 296 $shutdown = 0; 304 our $reload : shared;297 our $reload; 305 298 $reload = 0; 306 299 … … 340 333 # Put things in ~/.owl/shutdown 341 334 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. 344 336 $shutdown = 1; 345 337 mainloop_hook(); … … 362 354 # Reload Code, taken from /afs/sipb/user/jdaniel/project/owl/perl 363 355 ################################################################################ 364 sub reload_hook (@) 365 { 366 367 356 sub reload_hook (@) 357 { 368 358 onStart(); 369 359 return 1; 370 360 } 371 361 372 sub reload 373 { 374 # Shutdown existing threads.362 sub reload 363 { 364 # Use $reload to tell modules that we're performing a reload. 375 365 $reload = 1; 376 366 owl::mainloop_hook(); … … 378 368 @onMainLoop = (); 379 369 @onStartSubs = (); 380 370 381 371 # Do reload 382 372 package main;
Note: See TracChangeset
for help on using the changeset viewer.