You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@mesos.apache.org by "Greg Mann (JIRA)" <ji...@apache.org> on 2015/12/19 02:35:46 UTC

[jira] [Commented] (MESOS-3996) libprocess: document when, why defer() is necessary

    [ https://issues.apache.org/jira/browse/MESOS-3996?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15065126#comment-15065126 ] 

Greg Mann commented on MESOS-3996:
----------------------------------

Review here: https://reviews.apache.org/r/41474/

> libprocess: document when, why defer() is necessary
> ---------------------------------------------------
>
>                 Key: MESOS-3996
>                 URL: https://issues.apache.org/jira/browse/MESOS-3996
>             Project: Mesos
>          Issue Type: Documentation
>            Reporter: Neil Conway
>            Assignee: Greg Mann
>            Priority: Minor
>              Labels: documentation, libprocess, mesosphere
>
> Current rules around this are pretty confusing and undocumented, as evidenced by some recent bugs in this area.
> Some example snippets in the mesos source code that were a result of this confusion and are indeed bugs:
> 1. https://github.com/apache/mesos/blob/master/src/slave/containerizer/mesos/provisioner/docker/registry_client.cpp#L754
> {code}
> return doHttpGet(blobURL, None(), true, true, None())
>     .then([this, blobURLPath, digest, filePath](
>         const http::Response& response) -> Future<size_t> {
>       Try<int> fd = os::open(
>           filePath.value,
>           O_WRONLY | O_CREAT | O_TRUNC | O_CLOEXEC,
>           S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)