Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use autoincrementing number for handler ids #105

Merged
merged 3 commits into from
Nov 10, 2016

Commits on Nov 6, 2016

  1. Use Option over positive and negative numbers

    Use an Option<i64> for r_id instead of a plain i64, and use None instead
    of -1 to indicate the id does not exist in the handles.
    dlrobertson committed Nov 6, 2016
    Configuration menu
    Copy the full SHA
    11322a9 View commit details
    Browse the repository at this point in the history

Commits on Nov 7, 2016

  1. Use an auto-incrementing u64 as the fd id

    Use an auto incrementing u64 value as the OsIpcReceiver's id within the
    OsIpcReceiverSet in the inprocess and unix modules.
    
      - Change the type returned by OsIpcReceiverSet select and add to u64,
        to delay overflow.
      - Factor out the implementation of an auto-incrementing id
        inprocess into os::Incrementor, to be used by other platforms.
      - Use the Incrementor in the unix module to decouple the id of the
        OsIpcReceiver from the file descriptor to avoid race conditions due
        to file descriptor reuse.
    dlrobertson committed Nov 7, 2016
    Configuration menu
    Copy the full SHA
    e06edbc View commit details
    Browse the repository at this point in the history

Commits on Nov 10, 2016

  1. Unix: Close the fd on ChannelClosed

    For unix OSes make sure to close the file descriptor on ChannelClosed.
    The file descriptors should be closed in select to avoid leaking fds
    after removal from pollfds (servo#96). After e06edbc this is safe and
    avoids the previously seen race condition due to file descriptor
    reuse.
    dlrobertson committed Nov 10, 2016
    Configuration menu
    Copy the full SHA
    2e1081c View commit details
    Browse the repository at this point in the history