tk icon indicating copy to clipboard operation
tk copied to clipboard

treat the default mode of eventloop thread restriction

Open h-nagai opened this issue 2 years ago • 1 comments

On irb, the default mode of eventloop thread control is "runnable on non-main thread", that is, "Thead.new{Tk.mainloo]" works. Probably irb users would prefer to be able to control widgets interactively. Otherwise, the default mode is "runnable on the main thread only", because "unnable on non-main thread" requires more processing cost. To make mode selection easier, add a constant ::TK_MAINLOOP_ON_MAIN_THREAD_ONLY. By setting the value of the constant before "require 'tk'", we can select the mode of eventloop.

h-nagai avatar Oct 05 '22 15:10 h-nagai

@h-nagai Thanks to your pull-request. I added write permission to you in this repository.

@jeremyevans and others: @h-nagai is the original maintainer of ruby-tk library. There is no reason to not add him to maintainers.

hsbt avatar Oct 07 '22 09:10 hsbt

@h-nagai Do you want to merge this and #49? I am planning to make another release soon for #52 and would like to include both of these commits if you think they are ready.

jeremyevans avatar Nov 07 '23 01:11 jeremyevans

I'm going to merge this now so it can be included in the upcoming release.

jeremyevans avatar Nov 09 '23 21:11 jeremyevans