tk
tk copied to clipboard
treat the default mode of eventloop thread restriction
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 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.
@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.
I'm going to merge this now so it can be included in the upcoming release.