From: Eric Wrong Date: 2017-09-12T05:40:27+00:00 Subject: [ruby-core:82756] Re: [Ruby trunk Feature#13618] [PATCH] auto fiber schedule for rb_wait_for_single_fd and rb_waitpid Eric Wrong wrote: > mame@ruby-lang.org wrote: > > I believe that this feature should be introduced with another > > name. I have no counterproposal, though. Sorry. > > What about Thriber? Or Fred? > > "Fread" might be confused with fread(3) function, and I don't > know anybody named "Fred", so it is a safe name to choose :) OK, "class Fred" occurs in object.c documentation already, so maybe it is confusing. So I choose Thriber as a name: https://80x24.org/spew/20170912053032.13622-1-e@80x24.org/raw That patch contains the latest version of this feature rebased against ko1's recent execution context changes in trunk (up to r59844) along with some bugfixes (infinite wait fix). It also adds rb_thread_fd_select as a scheduling point (in addition to rb_wait_for_single_fd and rb_waitpid from previously published patches). Only lightly tested, more tests will need to be written... Naming is hard :< Pull request available below for git users: The following changes since commit 65b11a04f10a2438f0d6ba263a78d16367c3aac0: console.c: set winsize on Windows (2017-09-11 20:10:34 +0000) are available in the git repository at: git://80x24.org/ruby thriber for you to fetch changes up to d9c0095537c3c01d2187e783910cdc92d6c545fc: thriber: green threads implemented using fibers (2017-09-12 05:29:31 +0000) ---------------------------------------------------------------- Eric Wrong (1): thriber: green threads implemented using fibers common.mk | 7 + configure.in | 32 + cont.c | 123 ++- include/ruby/io.h | 2 + iom.h | 95 +++ iom_common.h | 204 +++++ iom_epoll.h | 697 ++++++++++++++++ iom_internal.h | 280 +++++++ iom_kqueue.h | 899 +++++++++++++++++++++ iom_pingable_common.h | 54 ++ iom_select.h | 448 ++++++++++ prelude.rb | 12 + process.c | 15 +- signal.c | 39 +- .../wait_for_single_fd/test_wait_for_single_fd.rb | 62 ++ test/lib/leakchecker.rb | 9 + test/ruby/test_thriber.rb | 274 +++++++ thread.c | 76 +- thread_pthread.c | 5 + vm.c | 9 + vm_core.h | 4 + 21 files changed, 3324 insertions(+), 22 deletions(-) create mode 100644 iom.h create mode 100644 iom_common.h create mode 100644 iom_epoll.h create mode 100644 iom_internal.h create mode 100644 iom_kqueue.h create mode 100644 iom_pingable_common.h create mode 100644 iom_select.h create mode 100644 test/ruby/test_thriber.rb -- Mr. Wrong Unsubscribe: