mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	* ext/tk/tcltklib.c (lib_eventloop_ensure): mis-delete a timer handler
when exit from a recursive called eventloop * ext/tk/lib/tk/timer.rb: new TkRTTimer class, which can works for a realtime operation * ext/tk/sample/tkrttimer.rb: sample of TkRTTimer class * ext/tk/lib/tk/textmark.rb: move TkTextMark#+ and TkTextMark#- to TkText::IndexModMethods * ext/tk/lib/tk/text.rb: improve TkTextMark#+ and TkTextMark#-, and add them to TkText::IndexModMethods module * ext/tk/sample/tktextio.rb: add test part of "seek by text index modifiers" git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8133 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
		
							parent
							
								
									7935361d36
								
							
						
					
					
						commit
						d2a9e77748
					
				
					 35 changed files with 550 additions and 292 deletions
				
			
		|  | @ -4,7 +4,7 @@ | |||
|  *              Oct. 24, 1997   Y. Matsumoto | ||||
|  */ | ||||
| 
 | ||||
| #define TCLTKLIB_RELEASE_DATE "2005-03-02" | ||||
| #define TCLTKLIB_RELEASE_DATE "2005-03-10" | ||||
| 
 | ||||
| #include "ruby.h" | ||||
| #include "rubysig.h" | ||||
|  | @ -652,7 +652,7 @@ _timer_for_tcl(clientData) | |||
|     /* struct invoke_queue *q, *tmp; */ | ||||
|     /* VALUE thread; */ | ||||
| 
 | ||||
|     DUMP1("called timer_for_tcl"); | ||||
|     DUMP1("call _timer_for_tcl"); | ||||
| 
 | ||||
|     thr_crit_bup = rb_thread_critical; | ||||
|     rb_thread_critical = Qtrue; | ||||
|  | @ -1402,9 +1402,6 @@ lib_eventloop_ensure(args) | |||
|     struct evloop_params *ptr = (struct evloop_params *)args; | ||||
|     volatile VALUE current_evloop = rb_thread_current(); | ||||
| 
 | ||||
|     Tk_DeleteTimerHandler(timer_token); | ||||
|     timer_token = (Tcl_TimerToken)NULL; | ||||
| 
 | ||||
|     DUMP2("eventloop_ensure: current-thread : %lx", current_evloop); | ||||
|     DUMP2("eventloop_ensure: eventloop-thread : %lx", eventloop_thread); | ||||
|     if (eventloop_thread != current_evloop) { | ||||
|  | @ -1422,7 +1419,12 @@ lib_eventloop_ensure(args) | |||
|             break; | ||||
|         } | ||||
| 
 | ||||
|         if (NIL_P(eventloop_thread)) break;  | ||||
|         if (NIL_P(eventloop_thread)) { | ||||
|           Tk_DeleteTimerHandler(timer_token); | ||||
|           timer_token = (Tcl_TimerToken)NULL; | ||||
| 
 | ||||
|           break;  | ||||
|         } | ||||
| 
 | ||||
|         if (RTEST(rb_funcall(eventloop_thread, ID_alive_p, 0, 0))) { | ||||
|             DUMP2("eventloop-enshure: wake up parent %lx", eventloop_thread); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 nagai
						nagai