git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] run_processes_parallel: change confusing task_cb convention

From
Stefan Beller <sbeller@google.com>
Date
Jul 19, 2017, 17:16 UTC
Message-ID
<CAGZ79kb9au53Rp5COvbbvoFToD_g4OAHQAqCFFUYyHi-EA+iAQ@mail.gmail.com>
In-Reply-To
<7151686aba3c5254bfff35bfd7cdd1d48992e99a.1500476164.git.johannes.schindelin@gmx.de>

On Wed, Jul 19, 2017 at 7:56 AM, Johannes Schindelin <johannes.schindelin@gmx.de> wrote:

Show 18 quoted lines
> By declaring the task_cb parameter of type `void **`, the signature of
> the get_next_task method suggests that the "task-specific cookie" can be
> defined in that method, and the signatures of the start_failure and of
> the task_finished methods declare that parameter of type `void *`,
> suggesting that those methods are mere users of said cookie.
>
> That convention makes a total lot of sense, because the tasks are pretty
> much dead when one of the latter two methods is called: there would be
> little use to reset that cookie at that point because nobody would be
> able to see the change afterwards.
>
> However, this is not what the code actually does. For all three methods,
> it passes the *address* of pp->children[i].data.
>
> As reasoned above, this behavior makes no sense. So let's change the
> implementation to adhere to the convention suggested by the signatures.
>
> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
My bad. Thanks for spotting and fixing!
Reviewed-by: Stefan Beller <sbeller@google.com>
Previous: Johannes Schindelin
Message 2 of 2 in “run_processes_parallel: change confusing task_cb convention”
  1. run_processes_parallel: change confusing task_cb conventionJohannes Schindelin, Jul 19, 2017
  2. Stefan BellerJul 19, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.