[ruby-core:82022] Re: [Ruby trunk Feature#13740] [PATCH] doc/extension.rdoc: start entries for threading and IO

From: Eric Wong <normalperson@...>
Date: 2017-07-13 04:21:08 UTC
List: ruby-core #82022
ko1@atdot.net wrote:
> > void *rb_thread_call_without_gvl(void *(*func)(void *), void *data1, rb_unblock_function_t *ubf, void *data2) ::
>  
> You need to mention that `func` is not allowed to call any
> `rb_` functions (there are exceptions but it should be used
> carefully). IMO this function is to danger so that I recommend
> to remove an explanation and only reference to the commented
> document in thread.c. At least, we need to emphasize the
> danger of this API.

OK, perhaps I will just refer users to read thread.c since
I mostly reused that text.  I will update tomorrow.

Thank you for your response.

> > int rb_io_wait_readable(int fd) ::
>  
> I'm not expert on this area so this is only a question. Can we
> support `fd` on our documented (may it means we encourage to
> use them) APIs?

I think there is no choice when it comes to interacting with
3rd-party libraries which open sockets (curl, mysql, pg, ...)
All of those APIs expose FDs for users to integrate into
existing event loop.

Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>

In This Thread

Prev Next