Project

General

Profile

Feature #15909 ยป thread_kill_docs.patch

womble (Matt Palmer), 06/09/2019 12:05 AM

View differences:

thread.c
2404 2404

  
2405 2405
/*
2406 2406
 *  call-seq:
2407
 *     thr.exit        -> thr or nil
2408
 *     thr.kill        -> thr or nil
2409
 *     thr.terminate   -> thr or nil
2407
 *     thr.exit        -> thr
2408
 *     thr.kill        -> thr
2409
 *     thr.terminate   -> thr
2410 2410
 *
2411
 *  Terminates +thr+ and schedules another thread to be run.
2412
 *
2413
 *  If this thread is already marked to be killed, #exit returns the Thread.
2411
 *  Schedules +thr+ to be terminated.
2414 2412
 *
2415 2413
 *  If this is the main thread, or the last thread, exits the process.
2414
 *
2415
 *  Any ensure blocks in the terminated thread's call stack will be executed
2416
 *  before the thread terminates.
2417
 *
2418
 *  In order to be safe against asynchronous termination via #exit,
2419
 *  Thread.handle_interrupt should be called with Fixnum as the
2420
 *  ExceptionClass.
2416 2421
 */
2417 2422

  
2418 2423
VALUE