mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* thread.c (Thread.async_interrupt_timing): fix RDoc.
:never is not used any more. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38086 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
5697f69baa
commit
e742a446c8
2 changed files with 11 additions and 6 deletions
|
@ -1,3 +1,8 @@
|
|||
Sat Dec 1 03:45:47 2012 Koichi Sasada <ko1@atdot.net>
|
||||
|
||||
* thread.c (Thread.async_interrupt_timing): fix RDoc.
|
||||
:never is not used any more.
|
||||
|
||||
Sat Dec 1 02:56:19 2012 Koichi Sasada <ko1@atdot.net>
|
||||
|
||||
* iseq.c: add RubyVM::InstructionSequence (ISeq) inspection methods.
|
||||
|
|
12
thread.c
12
thread.c
|
@ -1585,7 +1585,7 @@ async_interrupt_timing_arg_check_i(VALUE key, VALUE val)
|
|||
*
|
||||
* TODO (DOC): Thread#async_interrupt_timing is stacked.
|
||||
* TODO (DOC): check ancestors.
|
||||
* TODO (DOC): to prevent all async interrupt, {Object => :never} works.
|
||||
* TODO (DOC): to prevent all async interrupt, {Object => :defer} works.
|
||||
*
|
||||
* NOTE: Asynchronous interrupts are difficult to use.
|
||||
* If you need to communicate between threads,
|
||||
|
@ -1595,7 +1595,7 @@ async_interrupt_timing_arg_check_i(VALUE key, VALUE val)
|
|||
*
|
||||
* # example: Guard from Thread#raise
|
||||
* th = Thread.new do
|
||||
* Thead.async_interrupt_timing(RuntimeError => :never) {
|
||||
* Thead.async_interrupt_timing(RuntimeError => :defer) {
|
||||
* begin
|
||||
* # Thread#raise doesn't async interrupt here.
|
||||
* # You can write resource allocation code safely.
|
||||
|
@ -1615,7 +1615,7 @@ async_interrupt_timing_arg_check_i(VALUE key, VALUE val)
|
|||
*
|
||||
* # example: Guard from TimeoutError
|
||||
* require 'timeout'
|
||||
* Thread.async_interrupt_timing(TimeoutError => :never) {
|
||||
* Thread.async_interrupt_timing(TimeoutError => :defer) {
|
||||
* timeout(10){
|
||||
* # TimeoutError doesn't occur here
|
||||
* Thread.async_interrupt_timing(TimeoutError => :on_blocking) {
|
||||
|
@ -1627,14 +1627,14 @@ async_interrupt_timing_arg_check_i(VALUE key, VALUE val)
|
|||
* }
|
||||
*
|
||||
* # example: Stack control settings
|
||||
* Thread.async_interrupt_timing(FooError => :never) {
|
||||
* Thread.async_interrupt_timing(BarError => :never) {
|
||||
* Thread.async_interrupt_timing(FooError => :defer) {
|
||||
* Thread.async_interrupt_timing(BarError => :defer) {
|
||||
* # FooError and BarError are prohibited.
|
||||
* }
|
||||
* }
|
||||
*
|
||||
* # example: check ancestors
|
||||
* Thread.async_interrupt_timing(Exception => :never) {
|
||||
* Thread.async_interrupt_timing(Exception => :defer) {
|
||||
* # all exceptions inherited from Exception are prohibited.
|
||||
* }
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue