Re: RFC: make _fiber_start() return a handle on the fiber

Jukka Rissanen

Hi Ben,

On Fri, 2016-02-19 at 10:36 -0500, Benjamin Walsh wrote:
When we start a fiber via the _fiber_start() API family, we don't
get back a handle on the created fiber. The fiber identifier is
actually the start of the fiber's stack. This hasn't been a
until now since no API requires a handle on the fiber, except
fiber_delayed_start_cancel(): that API is part of a pair, where
other API, fiber_delayed_start() starts the fiber and returns a

However, Jukka asked me an API could be created that cancels a
fiber_sleep() call, something like fiber_wakeup(). The
implementation of such an API is very simple, but it requires a
handle on the fiber we want to wake up. This in turn requires the
signature of the _fiber_start() family to return a handle to the
fiber that gets started.

The signature of _fiber_start() et al. would then change from a
return type to a void * return type.

Objections, comments, etc ?
No comments -> no objects -> perhaps we can continue with this
Looks like it. You want to do the implementation yourself Jukka ?
I am a bit busy right now so I am fine if you do it.


Join { to automatically receive all group messages.